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: 

Submit program with dynamic selection screen

Former Member
0 Kudos

Hi,

In APO I am facing an issue with submiting the program /sapapo/rlcdelete. I have a radio button Category which when clicked opens up a select option where the low parameter needs to be populated with value 'AG'. This is not possible with the submit program option. Is there any solution for this issue.

cheers

Aveek Ghose

5 REPLIES 5

Former Member
0 Kudos

Try using Ranges with the submit.

RANGES: R_TAB FOR MATNR.

You can populate the R_TAB with required value.

SUBMIT REPORT1 VIA SELECTION-SCREEN

WITH S_MATNR IN R_TAB.

hymavathi_oruganti
Active Contributor
0 Kudos

U CAN TRY LIKE THIS.

GIVE A NUMBER TO THE SELECTION-SCREEN,

SUBMIT /SAPAPO/RLCDELETE USING SELECTION-SCREEN DYNNR.

Former Member
0 Kudos

Hi

you can try using User command

PARAMETERS show_all radiobutton group g1 USER-COMMAND flag.

PARAMETERS no_show radiobutton group g1 default 'X'.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.

select-options: s_opt(10) TYPE c modif id bl2,

s_opt-low = 'AG'.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF show_all <> 'X' AND

screen-group1 = 'BL2'.

screen-active = '0'.

ENDIF.

MODIFY SCREEN.

endloop.

regards

0 Kudos

The requirement is that the selection screen needs to be populated with the variant in the submit program. I am dumping the code here so that you can take a look:

**Selection Screen Elements for /SAPAPO/RLCDELETE

DATA: gc_radio_btn TYPE rsscr_kind VALUE 'R',

gc_parameter TYPE rsscr_kind VALUE 'P',

gc_sel_optn TYPE rsscr_kind VALUE 'S',

gc_sign_i TYPE tvarv_sign VALUE 'I',

gc_option_eq TYPE tvarv_opti VALUE 'EQ',

gc_manual_sel TYPE rsscr_name VALUE 'SHUF_PA1',

gc_product TYPE rsscr_name VALUE 'SEL_PROD',

gc_location TYPE rsscr_name VALUE 'SEL_LOC',

gc_plan_vrsn TYPE rsscr_name VALUE 'P_VERSIO',

gc_fixed_ord TYPE rsscr_name VALUE 'P_FIXED',

gc_category TYPE rsscr_name VALUE 'RB_CAT',

gc_key_fig TYPE rsscr_name VALUE 'RB_KEYF',

gc_only_apo TYPE rsscr_name VALUE 'P_APO',

gc_test_run TYPE rsscr_name VALUE 'P_TEST',

gc_pvrsn_000 TYPE tvarv_val VALUE '000',

gc_s TYPE ddbool_d VALUE 'S',

gc_inactive TYPE zdstat1 VALUE 'I',

gc_set TYPE char1 VALUE 'X',

gc_set_val TYPE tvarv_val VALUE 'X',

gc_ag TYPE /SAPAPO/ATPCAT VALUE 'AG',

gc_int_commit TYPE bapi10001commctrl VALUE 'E',

gc_bs_group TYPE /sapapo/logqs VALUE 'BSGAPO',

gc_error TYPE bapi_mtype VALUE 'E',

gc_abend TYPE bapi_mtype VALUE 'A',

gc_dot TYPE char1 vALUE '.',

gc_colon TYPE char1 VALUE ':',

gc_space TYPE char4 VALUE ' ',

gc_star TYPE char1 VALUE '*'.

*Field-symbols

FIELD-SYMBOLS: <lfs_data> TYPE s_f4_data_loc.

  • Populate the selection screen table

PERFORM f_populate_screen_table USING:

    • Field Name Type Sign Option Low Value

    • Populate the Additional selection options

    • Select the Manual selection button

gc_manual_sel gc_radio_btn gc_sign_i gc_option_eq gc_set_val space,

    • Populate the Planning Version

gc_plan_vrsn gc_parameter gc_sign_i gc_option_eq gc_pvrsn_000 space.

*

**Populate the Core Products to be deleted

PERFORM f_populate_screen_table USING:

gc_product gc_sel_optn gc_sign_i gc_option_eq iv_matnr space.

    • Populate the Product Variants to be deleted

PERFORM f_populate_screen_table USING:

gc_product gc_sel_optn gc_sign_i gc_option_eq iv_matnr space.

    • Populate the Locations to be deleted.

*

PERFORM f_populate_screen_table USING:

gc_location gc_sel_optn gc_sign_i gc_option_eq iv_locfr space.

    • Populate the Fixed Orders Checkbox

PERFORM f_populate_screen_table USING:

gc_fixed_ord gc_parameter gc_sign_i gc_option_eq gc_set_val space,

    • Populate the Selection Objects

*

    • Unselect the Key Figure Radio Button

gc_key_fig gc_radio_btn gc_sign_i gc_option_eq space space,

    • By Category Radio Button

gc_category gc_radio_btn gc_sign_I gc_option_eq gc_set_val SPACE,

*

    • Populate the Settings

    • Select Delete Transactional data only in APO Radio Button

gc_only_apo gc_radio_btn gc_sign_i gc_option_eq gc_set_val space,

    • Uncheck the Test Run check box.

gc_test_run gc_parameter gc_sign_i gc_option_eq space space.

    • Submit to SAP Standard report /SAPAPO/RLCDELETE

    • For deleting manually entered data for the product and location

SUBMIT /sapapo/rlcdelete WITH SELECTION-TABLE gt_variant_table

AND RETURN.

FORM f_populate_screen_table USING iv_name TYPE rsscr_name

iv_type TYPE rsscr_kind

iv_sign TYPE tvarv_sign

iv_option TYPE tvarv_opti

iv_low TYPE any

iv_high TYPE tvarv_val.

    • Local Data Declaration

DATA: ls_variant TYPE rsparams.

  • Populate the Screen Table

ls_variant-selname = iv_name.

ls_variant-kind = iv_type.

ls_variant-sign = iv_sign.

ls_variant-option = iv_option.

ls_variant-low = iv_low.

ls_variant-high = iv_high.

APPEND ls_variant TO gt_variant_table.

CLEAR ls_variant.

ENDFORM. " F_POPULATE_SCREEN_TABLE

In the transaction /sapapo/rlcdel the category radio button needs to be checked and the value in the box that opens up needs to be 'AG'.

Looking forward to the issue resolution.

cheers

Aveek

Former Member
0 Kudos

user command option is the right one,This was asked in an interview to me.

and use screen-invisible to make the fields dynamic.

Assign the command name and check using sy-ucomm and give screen-invisible in that.

Give a modif id to the paramters to group it in a name

George