Application Development and Automation 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: 
Read only

Variant for Module Pool - Subscreen

Former Member
0 Likes
1,160

Hi guys,

I need to add, display, change, delete and search variants in a PBO module. These are the variants of a subscreen. I have on the same screen a subscreen for the selection and a space for the result list. I have found following function modules: RS_VARIANT_ADD, RS_VARIANT_DISPLAY, RS_VARIANT_CHANGE, RS_VARIANT_DELETE. Are they suitable for this purpose? Can you provide some examples where this is implemented?

Implementation will be done in the PBO Module : Module User_Command_XXXXX Input.

Thanks

4 REPLIES 4
Read only

Ashg1402
Contributor
0 Likes
882

Hi Maria,

For what do you want variant for.? Like for notif, order, equipment.? 

Read only

Former Member
0 Likes
882

I wrote my own report and cannot use the generate sap variants implementation because I am selecting in a subscreen that I have created.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
882

Yes you can manage in PBO and PAI some Fm as

  • RS_VARIANT_EXISTS
  • (PBO) RS_SUPPORT_SELECTIONS
  • (PAI)  RS_VARIANT_SAVE_FROM_SELSCREEN (as function code SPOS ) ,   RS_VARIANT_FETCH (GET) RS_VARIANT_LIST  (VARI)

Hint: As those FM should be executed in main dynpro, so not the selection-screen subscreen, you may (will) be required to set sy-dynnr, sy-slset before/after call of those.

Regards,

Raymond

Read only

Sandra_Rossi
Active Contributor
0 Likes
882

I wouldn't recommend to use the standard function modules for handling program variants in normal dynpros, even if it contains a selection screen of type subscreen. I think you'll get many weird effects. Instead, I advise defining the screen as being a selection screen with a subscreen area containing your classic dynpro and let the standard handle the program variants. But I don't know what exactly is possible in your case, could you explain a little bit more what you're trying to achieve?