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 statement not working with PPIO_ENTRY.

Former Member
0 Kudos

Hello Experts,

I have a scenario where i need to call PPIO_ENTRY in a custom program using the entries from a Z-table ( which has 2 fields plant and material).

I have tried SUBMIT With selection-table.

the problem here is that the selection criteria is populated to PPIO_ENTRY partially. It populates the material and plant just fine. but i have an additional field which are not populated.

my code goes as follows:

if  z-table[] is not initial.

wa_tab-SELNAME = 'PPIO_LISTTYP'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = ' PPIOH000'.

APPEND wa_tab TO it_TAB.

CLEAR wa_tab.

wa_tab-SELNAME = 'P_ALV'.

wa_tab-KIND    = 'P'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = '000000000001'.

APPEND wa_tab TO it_TAB.

CLEAR wa_tab.

wa_tab-SELNAME = 'FLG_PRODORD'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = 'X'.

APPEND wa_tab TO it_TAB.

CLEAR wa_tab.

wa_tab-SELNAME = 'S_WERKS'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = P_WERKS .

APPEND wa_tab TO it_TAB.

CLEAR wa_tab.

LOOP AT z-table INTO wa_ztable.

   wa_tab-SELNAME = 'S_MATNR'.

   wa_tab-SIGN    = 'I'.

   wa_tab-OPTION  = 'EQ'.

   wa_tab-LOW     = wa_ztable-MATNR .

   APPEND wa_tab TO it_TAB.

   CLEAR wa_tab.

ENDLOOP.

wa_tab-SELNAME = 'P_SELID'.

wa_tab-KIND    = 'P'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = 'ZAPP010'.

APPEND wa_tab TO it_TAB.

CLEAR wa_tab.

wa_tab-SELNAME = 'P_SYOP1'.

wa_tab-KIND    = 'P'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = 'REL'.

APPEND wa_tab TO it_TAB.

CLEAR wa_tab.

wa_tab-SELNAME = 'P_SYOP2'.

wa_tab-KIND    = 'P'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = 'MSPT'.

APPEND wa_tab TO it_TAB.

CLEAR wa_tab.

"" in second tab of the selection screen we have these fields...

wa_tab-SELNAME = 'FUNCT'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = '160'.

APPEND wa_tab TO it_TAB.

CLEAR wa_tab.

wa_tab-SELNAME = 'PROCESS_TYPE'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = 'E'.

APPEND wa_tab TO it_TAB.

CLEAR wa_tab.

wa_tab-SELNAME = 'MAX_WORKPROC'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = '99'.

APPEND wa_tab TO iT_TAB.

CLEAR wa_tab.

wa_tab-SELNAME = 'AV_CHECK_TYPE'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = 'A'.

APPEND wa_tab TO iT_TAB.

CLEAR wa_tab.

wa_tab-SELNAME = 'AV_PROTOCOL'.

wa_tab-SIGN    = 'I'.

wa_tab-OPTION  = 'EQ'.

wa_tab-LOW     = 'E'.

APPEND wa_tab TO it_TAB.

CLEAR wa_tab.

                      SUBMIT ppio_entry VIA SELECTION-SCREEN

          WITH SELECTION-TABLE lt_tab[]

                    AND RETURN.

Endif.


The reason for using selection table is we had multiple values for material. We have also tried to pass the values as parameters (single entries) and variants, even then only the material and plant get populated.

Now, except the Highlighted fields in this code. Rest of the fields are not populated in the selection screen.


Could anyone help me understand why is this happening.

Please refer to the images attached so that you can a better visualization of the issue.

Thank You so much for all your help.

8 REPLIES 8

0 Kudos

Hi   Mohan,

Try this

*--- Declarations ---*

data :

       it_purch_org TYPE RANGE OF selopt,   "purchase Org

       wa_purch_org TYPE selopt,

     wa_purch_org-sign     = 'I'.

     wa_purch_org-option   = 'BT'.

     wa_purch_org-low      =  lv_purch_org.

      APPEND wa_purch_org TO it_purch_org.

     CLEAR wa_purch_org.

    ENDIF.

SUBMIT <targer program (ppio_entry)> WITH s_ekorg IN  it_purch_org[]

Thanks and Regards,

Girish Kumar.

0 Kudos

Hi Girish Kumar,


We have already tried this one but the reason we had to go for selection table is that this can not be a solution for  parameter fields. In this selection screen few of the fields are also parameters and few are of kind drop-down lists.

For selection table, we can choose between parameter and select-option using the table field  '' rsparams-kind = 'P' or 'S' ".

Thank you for the quick reply..

0 Kudos

Hi Mohan,

I think it is  possible to pass the data for the (Parameters, Dropdowns, Check boxes)..

*--- Declarations---*

DATA : it_TAB TYPE RANGE OF selopt,

         wa_tab TYPE         selopt.



*--- Populating Data ---*

wa_tab-SIGN = 'I'.

wa_tab-OPTION = 'I'.

wa_tab-LOW = '60003525'.

APPEND wa_tab TO it_TAB.

*--- Calling Target Program---*

SUBMIT ppio_entry WITH  P_AUTYP = '99'              " For drop down lists

                                 WITH  S_AUFNR IN  it_TAB[]    " Select-options

                                 WITH  p_msvdis   = 'X'.               " For check boxs

In Debugging i can see these values are being passing to the target program  "ppio_entry"




All the fields of selections screen can be find in the screen 1000.


I think there might be miss-match while passing to the target program.


Thanks and Regards,

Girish Kumar V



Former Member
0 Kudos

Check the population of selection tables. It is wrongly populated as per me.

The KIND('S' or 'P' ) parameters are missing in some cases.

P_ALV is a single character field field('X' or Space) and you are trying to pass '000000001'. So obviously it won't be populated.

Similarly check the other fields from include PPIO_ENTRY_SEL_CRITERIA where the selection screen is declared.

R

raymond_giuseppi
Active Contributor
0 Kudos

Are you sure that every field is actually a parameter/select-option of the program PPIO_ENTRY, it's not the case in my versions for some (*), what is yours - NB: dropdown list are parameter for submit purpose.

Also some values are not allowed with the parameter name you used (wrong type, wrong mapping ?)


Regards,

Raymond

(*) Those not starting with PA_, P_ ,  SO_, S_ and WF_.

0 Kudos

Hi Raymond,

p_syst1 and p_syst2 fields are parameters in the same screen where the s_matnr and s_werks fields belongs. Still these values are not being populated. We have tried to populate these fields directly like this too, but no values are being populated.

SUBMIT PPIO_ENTRY with selection-table lt_seltab[] "lt_seltab contains matnr,werks andselid fields

                              WITH PPIO_ENTRY_SC1100-PPIO_LISTTYP = 'PPIOH000'

                              WITH PPIO_ENTRY_SC1100-alv_variant = '000000000001'

                              WITH p_syst1 = 'REL'

                              WITH p_syst2 ='MSPT'.

How are we supposed to populate the LIST and LAYOUT fields if passing like this is not correct ? We have also tried passing the values through the selection table also, stillthe fields are not being populated. Please help us understand why this is happening.

Thanks you so much for your help.

Former Member
0 Kudos

Issue resolved. Closing this thread.

How this is done is, i've created a variant and have passed few fields as selection table.

After keen observation of the function module "SUBMIT_REPORT", i was able to figure out the submit statement.

This is how it worked for me.

SUBMIT PPIO_ENTRY USING SELECTION-SET 'VARIANT'

                                       WITH SELECTION-TABLE lt_tab

                                        VIA SELECTION-SCREEN

                                        AND RETURN.

(The selection table contains the values in the loop and the variant contains the fixed constant values which were not being populated using selection table.)

Thanks all for the replies.

0 Kudos

Out of curiosity, could test the function module RS_VARIANT_VALUES_TECH_DATA with parameter report = 'PPIO_ENTRY' and variant = 'VARIANT' to get actual names of parameters in VARIANT_VALUES.


Hint: Also you should create a variant with a name starting with CUS& so it will be transported, and cannot be sadly modified by some final user...


Regards,

Raymond