‎2016 Jun 03 12:53 PM
Hi All,
I have a small query about the Logical Database.
Eg: my LDB name is ABCD, I am calling this LDB in my custom report: 1234.
Here the issue is, in the report 1234 where I am calling the LDB ABCD, I want to make the Selection screen(LDB) fields as Mandatory.
My LDB is being used in other reports as well so I cant make the Selection screen field as Obligatory in LDB.
I prefer to make Selection Screen fields Mandatory in my custom report.
It is possible?
I used an event At Selection-screen output in LDB to make a field mandatory and I got the error(I introduced popup to show mandatory field need to be update), when I click on OK button, i am not getting the Selection screen, instead its been executing.
Please let me know if it is possible to achieve this.
Regards,
EH
‎2016 Jun 03 1:03 PM
There is the keyword OBLIGATORY for PARAMETERS and SELECT-OPTIONS. You can use this for your requirement.
‎2016 Jun 03 1:09 PM
Hi Armin,
I can do that, since my LDB is been used by other reports and those reports doesn`t want Selection screen fields to be Obligatory.
For my specific report, I would like to have the Obligatory option for Selection screen.
‎2016 Jun 03 1:15 PM
Well, I'm not sure I got it correct. You've a report with selection fields and what's the problem to add the OBLIGATORY keyword to these fields? Other reports have their own fields, havn't they?
‎2016 Jun 03 1:17 PM
‎2016 Jun 03 1:30 PM
Can you give a code sample? LDB is for me the logical data base or do you mean another thing?
‎2016 Jun 03 1:29 PM
Hi Ethan,
Which LDB are you using in your custom report? For HR master data related LBDs, there's an option of 'HR Report Category'. Goto attributes of report in change mode and click on 'HR Report Category'. Create a custom HR report category. you can make screen field mandatory there specifically for your report.
‎2016 Jun 03 1:31 PM
Hi,
Its not HR LDB. I had created LDB related to our own requirement
‎2016 Jun 03 1:37 PM
Try this code:
Suppose if you are using NODE 'PERAS' for GET event and field name is 'PERNR' . Use below code to stop it from processing and throw error here.
AT SELECTION-SCREEN.
IF PERAS-PERNR IS INITIAL.
MESSAGE 'Enter Pernr' TYPE 'E'.
ENDIF.
‎2016 Jun 03 1:38 PM
And to make it required field, try below:
AT SELECTION-SCREEN OUTPUT.
loop at screen.
if screen-name = 'PNPBEGDA'. "Give here the screen field name that you want make as manadatory
screen-required = 1.
MODIFY SCREEN.
endif.
endloop.
‎2016 Jun 03 1:45 PM
Hi,
At selection-screen on <field-name>
If <field-name> is initial.
Display error message "Field value is mandatory"
endif.
Do the same for all the fields.
Refer the attached code and works what I have mentioned above. Field BR_BUKRS comes from LDB and error message will display in the selection screen bottom.
Regards,
‎2016 Jun 03 1:48 PM
I used an event At Selection-screen output in LDB to make a field mandatory and I got the error(I introduced popup to show mandatory field need to be update), when I click on OK button, i am not getting the Selection screen, instead its been executing.
Could you elaborate
Regards,
Raymond