Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Logical database issue

former_member183164
Active Participant
0 Kudos
411

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

11 REPLIES 11

Former Member
0 Kudos
216

There is the keyword OBLIGATORY for PARAMETERS and SELECT-OPTIONS. You can use this for your requirement.

0 Kudos
216

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.

0 Kudos
216

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?

0 Kudos
216

My report Selection fields are from LDB!

0 Kudos
216

Can you give a code sample? LDB is for me the logical data base or do you mean another thing?

pranay570708
Active Contributor
0 Kudos
216

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.

0 Kudos
216

Hi,

Its not HR LDB. I had created LDB related to our own requirement

0 Kudos
216

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.

0 Kudos
216

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.

Former Member
0 Kudos
216

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,

raymond_giuseppi
Active Contributor
0 Kudos
216

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

  • "in LDB" or in the other program?
  • What did you do in (PBO) T SELECTION-SCREEN OUTPUT
    (loop at screen/screen-required= '1'/modify screen/endloop)
  • Did you do anything in (PAI) AT SELECTION-SCREEN [ON xxx]
    (nothing should not be required...)

Regards,

Raymond