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: 

Pop up a screen on F-02 after initial input to read data for z-fields

hamid_moinuddin
Explorer
0 Kudos

Hi

I have a requirement to read 3 additional z-fields from the user in F-02 through a pop-up screen, which should appear only when a specific document type is entered on the f-02 main screen. Originally I had used the BAdI FI_HEADER_SUB_1300 to add these fields directly on the f-02 main screen but this approach was dismissed because the the additional data is not required in other postings and mandatory in the current requirement. Where exactly can we interrupt the standard program flow to present this sub-screen to the user? We also need to provide validation and input help for some of these z-fields.

TIA for your valuable inputs.

1 ACCEPTED SOLUTION

DoanManhQuynh
Active Contributor

i think you should create a fm in which you have a custom popup screen to lets user input those 3 fields and call it in method

PUT_DATA_TO_SCREEN_PAI when user inputted the specific document type (check it from import parameter im_bkpf) and may save it in class attribute. then get it back from GET_DATA_FROM_SCREEN_PAI.

5 REPLIES 5

raymond_giuseppi
Active Contributor
0 Kudos

Why didn't you hide the customer fields in the PBO of the subscreen in case they are not required (other document types)

hamid_moinuddin
Explorer
0 Kudos

The z-fields are part of the BAdI Implementation and they are called directly on f-02 first screen before the user gets a chance to input anything. At that point we do not know what document type the user will enter so we cannot hide it.

Of course you can, hide those by default only display those when user input the specific document type.

hamid_moinuddin
Explorer
0 Kudos

Thanks for replying Raymond. Excuse me if I havent understood you correctly, but what I have gathered from debugging... the BAdI is called before f-02 is initially loaded and then afterwards there's no call to BAdI as it is meant for implementation at the header level. Is it possible to call the BAdI or its subscreen again after the user enters basic header data?

And to make matters more confusing f-02 also has fields to enter the first line item details right there on the first screen along with header fields. Could you please advise in more detail? Appreciate your help.

DoanManhQuynh
Active Contributor

i think you should create a fm in which you have a custom popup screen to lets user input those 3 fields and call it in method

PUT_DATA_TO_SCREEN_PAI when user inputted the specific document type (check it from import parameter im_bkpf) and may save it in class attribute. then get it back from GET_DATA_FROM_SCREEN_PAI.