How to make a search helper for region filtering from a preselected country - abap

I have a selection screen like below code and I want to make a search helper to filter regions from selected value in P_LAND1:
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS: P_LAND1 TYPE LAND1,
P_BLAND TYPE BLAND.
SELECTION-SCREEN END OF BLOCK B1.

Simpliest way is to reference the fields to the table-field, where they are maintained in SAP (keeping in mind that an input help is defined as well, but you can check it in SE11, not an issue in this case). For countries this will be table T005, for regions table T005S (pls. note the field is not regio, but bland):
PARAMETERS: p_land1 TYPE t005-land1,
p_bland TYPE t005s-bland.
Also note, for the region by pressing F4 all possible values will be displayed, not just the regions of the country you entered one field above. If you need a user friendly solution, it has to be coded separately (in event AT SELECTION-SCREEN on VALUE-REQUEST FOR ...)

Related

How to mimic values in multi page SSRS Report

I need a lab report that has several pages. Each test has a unique reference number and I would like it to appear in the header according to what I have on the page. At the moment I only see one reference number and it remains unchanged after switching to another page. See attached image.
If possible, I would like to get rid of the SampleNo column so that its value is only in the header
The easiest way to do this is to reference the the textbox in your tablix that contains the "Sample No.".
Click the textbox that you have highlighted in the tablix, show the properties window (F4 in Visual Studio - can't remember in Report Builder, I think View/Properties).
Find the Name property of the textbox, this is often the name of the field it contains but not always.
In the example below the textbox name is 'oYear`
Next, set the expression in your header to be something like
=FIRST(ReportItems!oYear.Value)
Change oYear to whatever textbox name in your tablix is.
ReportItems refers to the rendered object name so here we just get the first on each page.
Here the first two pages from a small sample of data which groups by year.

PowerApps formula for matching records from a drop down

I'm trying to build a login form that performs a simple check against the user's PIN. The pin in stored in the database as a field in the Person entity (table).
I have a Team entity that allows the Person to select the Team they are on from a dropdown list of all Teams. The Person entity dropdown then populates based on the Person's TeamID. The User selects their Name and enters a PIN number in the txtPinNumber textbox.
The Login button is hidden by default and should only have visible = true when the pin entered into txtPinNumber is the same as the PIN field in the database.
I have the visible property of the btnLogin button set to
If(txtPinNumber.Text=Filter(Personnel,ddResponder.Selected.PIN),true,false)
However, I'm getting an error of unspecified type. Is it because I'm trying to check the entered PIN against a filtered datatype?
Any ideas on how to fix this error?
It looks like you're having difficulty because of your usage of the Filter() function. Filter() returns a table with all of the rows that meet a given criteria. However, it seems that ddResponder.Selected.Pin is the PIN you are seeking to match. If this is the case, you can simply have the visible property set to:
txtPinNumber.Text = ddResponder.Selected.Pin
If, however you need to do a search in your table to find the relevant PIN, you will instead want to use the Lookup() function.
You can see the documentation for these functions here:
https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/
The Lookup() function will return the first matching row based on the criteria you provide, otherwise it will return a blank. You can use this with the IsBlank() function to determine whether or not to display the button.

SSRS 2008 - Display Multi Value Parameter selections on individual excel tabs

I have a report that has a page break between each instance of a group. The field that I am breaking on is also a multi valued parameter within my report. What I would like to do is export the report and have each tab named after the value that is selected for each page.
For example, if I have a multi value parameter that has the selections: Cat, Dog, Bird, Fish and I have my table set to break on the field AnimalNames, which is the same field that I use for my parameter and I select Dog and Bird and I want to see the data for Dog and Bird on two separate tabs, how do I get each tab named after my selections?
I've tried Parameter.AnimalName.Value but that just names each tab after my first selection within the parameter.
Please Help!!!
I do this with one of my reports. Try setting the page name to:
=First(Fields!AnimalName.Value, "AnimalNameDataSet")

Reference textbox from chart expression in QlikView

Please advise (syntax) on how to reference a text object in QlikView to pick its value.
My object is called: TX1, it is a text box and it is defined like this:
=SUM( TOTAL Income)
Why do I need this?
I have a chart with Persons as a dimension, and the expression should calculate each person's income/total income.
The total income needs to be taken from that textbox with alternate state so it remains unaffected by the filter selections (or the dimension that forces total income to be seen as total income belonging to each person).
Thank you.
Any selections you make in your dashboard will have an effect on relational data shown within a text-box.
You can, however, store the initial value of your expression and keep it for later use.
Create a variable called vInitialSum or something, and set it upon opening the document. You'll then have the untouched (unfiltered) value of =SUM("Total Income") to use at your disposal.
Add the trigger in Settings > Document Properties > Triggers > OnOpen:
Just use this:
SUM({1}Income)
The "{1}" tells the formula to ignore any selections and calculate on the full data set. For more details, see "set analysis" and "set modifiers" in the help.

Dynamically fill selection-screen parameter on change

Suppose I have a selection-screen block with two parameters. I want to dynamically fill the second parameter based on what the user inputs in the first, for instance by querying a table to find the expected value for the key field in parameter 1.
As an example, say I have a program that does something for a combination of order number (p_aufnr) and WBS element (p_wbs). Instead of asking the user to provide both, I can determine one of them from the PSPEL field on the AUFK table. However, I still want to show this field to the user after he inputs his order number so he can verify that the WBS element is correct.
I've managed to do this by using the AT SELECTION SCREEN ON p_aufnr event to assign a value to p_wbs. This event is processed when the user presses enter. However, I can only ever get it to work once. So if the user enters an order number, realises from the retrieved WBS element that he made a mistake and changes it, the second parameter never changes. Even though the AT SELECTION SCREEN event is processed in the debugger, the parameter is not updated.
Am I not supposed to use this event for my scenario? If so, how would I then implement this sort of dynamic selection screen?
Forgot to add a code sample. The following report illustrates my issue: after entering a value in p_netw and pressing enter, p_wbs is filled with the value 1. However, if you press enter again the AT SELECTION-SCREEN ON routine is processed but the value for p_wbs is not updated, while lv_count is.
DATA: lv_count TYPE i.
SELECTION-SCREEN BEGIN OF BLOCK main.
PARAMETERS: p_netw TYPE aufnr OBLIGATORY MODIF ID auf.
PARAMETERS: p_wbs TYPE i MODIF ID psp.
SELECTION-SCREEN END OF BLOCK main.
AT SELECTION-SCREEN ON p_netw.
ADD 1 TO lv_count.
p_wbs = lv_count.
START-OF-SELECTION.
PERFORM main.
FORM main.
WRITE: 'The value reached ', lv_count.
ENDFORM.
Apparently the data is not written back to the screen if you update the field in the field-specific block. If you move the field update from AT SELECTION-SCREEN ON p_netw to the global AT SELECTION-SCREEN event, it works. Don't ask me why, though - this seems to a case of undocumented system behaviour...
DATA: lv_count TYPE i.
SELECTION-SCREEN BEGIN OF BLOCK main.
PARAMETERS: p_netw TYPE aufnr OBLIGATORY MODIF ID auf.
PARAMETERS: p_wbs TYPE i MODIF ID psp.
SELECTION-SCREEN END OF BLOCK main.
AT SELECTION-SCREEN ON p_netw.
ADD 1 TO lv_count.
AT SELECTION-SCREEN.
p_wbs = lv_count.
You need to use a PAI (process after input) module on your screen which then takes the new p_aufnr and finds the appropriate p_wbs - probably exactly like your at selection screen event. You will then CALL SCREEN ### <-- your screen number to display the data on your screen. Without any code to work off thats all i can help with.