‎2008 Jul 05 8:16 AM
Hi All,
I am calling another z program from one z program using submit statement. Can I automatically fill the selection-screen of the called program. The first z program is to get the open PO's. On clicking the PO number it has to open my second Z program with Purchase organization and purchase order number which i clicked from my first program come into the selection screen of the second program. Is it possible to do it. Awaiting for fast reply.
thanks,
RajBabu...
‎2008 Jul 05 8:22 AM
hi,
yes you can do this.also you can export import the select options from one program to another if you are unable in submitting with select option.
but first try with submit zprogram with select options.
while sending select option in submit statement , you wil hav to pass each and everthng with sign option low value high value in statement..so just take care of that..
‎2008 Jul 05 8:31 AM
Should I specify any thing in the 2nd program also. Which submit option to be taken exactly in my first program to fill the selection screen in the 2nd program....
‎2008 Jul 05 8:35 AM
hi,
it depends on by which you are goin...
if you are goin by export import.
before submitting 2nd program in 1st program,export all the select optin to a memory Id.
and in second program at initialization or even at start of selction if there is no at selection -screen event ,you can import all the select-option from the same memory Id.
but if you are using submit with selectoptions then you don need to do anythng in your second report.
values for select options will get passed there..
‎2008 Jul 05 8:24 AM
Hi,
Its possible to acheive that kind of functionality using submit. If you are displaying the opne PO's on an interactive list, use AT-LINE SELECTION event and obtain the user selected PO (from sy-lisel). Once you do that you can transfer the data from this program to the other program using SUBMIT and run the other program to get the required output.
For more information on SUBMIT.
http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/content.htm
In the above link you will be able to find different ways in which you can pass data between two programs.
Regards,
Avinash Ravipati.
‎2008 Jul 05 8:25 AM
Hi Raj,
Yes you can do this by the following option of SUBMIT.
SUBMIT... [VIA SELECTION-SCREEN]
[USING SELECTION-SET <var>]
[WITH <sel> <criterion>]
[WITH FREE SELECTIONS <freesel>]
[WITH SELECTION-TABLE <rspar>].
Check this link to get the complete details of the above statement.
http://help.sap.com/saphelp_46c/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/content.htm
Hope this helps you.
Regards,
Chandra Sekhar
‎2008 Jul 05 8:36 AM
Hi,
Populate all ur select options and parameters in to one internal table of structure RSPARAMS and use below statement to submit the report.
Eg: wa_rsparams-name = 'SO_MATNR',
wa_rsparams-kind = 'S' "Select option.)P for parameter)
wa_rsparams-sign = 'I'.
wa_rsparams-option = 'BT'.
wa_rsparams-low = '10'.
wa_rsparams-HIGH = 10000'.
APPEND wa_rsparams TO i_rsparams.
SUBMIT zrep2 WITH SELECTION-TABLE i_rsparams.
Thanks,
Vinod.
‎2008 Jul 05 8:51 AM
Hi Raj,
Yes you can send the values of selection-screen elements of the other program using the addition
With selection-table <seltab>..
Data:
w_scrtab like table of rsparams,
wa_scr like line of w_scrtab.
wa_scr-selname = 'P_PARAM1'.
wa_scr-kind = 'P'.
wa_scr-sign = 'EQ'.
wa_scr-low = ' rin '.
wa_scr-high = 'RAJ'.
*wa_scr-low = 'BABU'.
append wa_scr to w_scrtab.
wa_scr-low = 'RAJ'.
append wa_scr to w_scrtab.
submit zprog_called1
with selection-table w_scrtab
and return.
Hope the sample code above helps you.
Regards
Narin Nandivada
‎2008 Jul 05 2:50 PM