2015 Jul 19 10:38 AM
Hi everyone ,
I have a requirement to create a custom program and submit the standard program RWDPOSAN .ie tcode wpma .
here i want to submit the selection screen data of my custom program to run the standard program RWDPOSAN
i dont want to display the selection of standard program RWDPOSAN.i have used submit progname> via selection screen and return
submit program> via selection screen with selection table and return
Please help me
Thanks in advance .
2015 Jul 19 10:57 AM
Hi,
You need to take out the VIA SELECTION SCREEN in the submit statement. The selection screen will not be displayed.
Regards,
Sam,
2015 Jul 19 12:13 PM
I did with out via selection screen . even though it was not coming
2015 Jul 19 12:18 PM
2015 Jul 19 12:30 PM
Hi Sam ,
Please have a look at my code
REPORT Z30_POS_WRAPPER.
TABLES: T001W,
T001L,
MARA,
KONBBYH,
WAKH,
tbtcjob.
data sel_tab type TABLE OF rsparams.
data ls_itab LIKE LINE OF sel_tab .
SELECTION-SCREEN BEGIN OF BLOCK B1
WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: SO_VKORG for T001W-VKORG,
SO_VTWEG for T001W-VTWEG,
SO_WERKS FOR T001W-WERKS,
SO_BBUY FOR KONBBYH-BBYNR,
SO_MATAR FOR MARA-MATNR,
SO_MATKL FOR MARA-MATKL,
SO_PROMO FOR WAKH-AKTNR MATCHCODE OBJECT WAKH.
PARAMETERS: PA_DELE LIKE EDIDOC1-SYNTAX DEFAULT ' ' ,
PA_DEBUG LIKE EDIDOC1-SYNTAX DEFAULT ' '.
PARAMETERS: PA_DATAB LIKE WPSTRUC-DATUM,
PA_DATBI LIKE WPSTRUC-DATUM DEFAULT '00000000',
pa_job LIKE tbtcjob-jobname.
SELECTION-SCREEN END OF BLOCK B1.
*SUBMIT RWDPOSAN and RETURN.
*SUBMIT RWDPOSAN WITH SELECTION-TABLE itab[] .
*SUBMIT RWDPOSAN USING SELECTION-SETS OF PROGRAM 'Z30_POS_WRAPPER'.
ls_itab-selname = 'SO_BBUY'.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
ls_itab-selname = 'SO_MATAR'.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
ls_itab-selname = 'SO_VKORG'.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
ls_itab-selname = 'SO_VTWEG'.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
ls_itab-selname = 'SO_WERKS'.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
ls_itab-selname = 'SO_MATKL '.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
ls_itab-selname = ' SO_PROMO'.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
ls_itab-selname = 'PA_DELE'.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
ls_itab-selname = 'PA_DEBUG'.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
ls_itab-selname = ' PA_DATAB'.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
ls_itab-selname = 'PA_DATBI'.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
ls_itab-selname = 'pa_job '.
ls_itab-kind = 'S'.
ls_itab-sign = 'I'.
ls_itab-option = 'EQ'.
ls_itab-low = 'OR'.
APPEND ls_itab to sel_tab.
*****SUBMIT RWDPOSAN WITH SELECTION-TABLE itab.
******SUBMIT RWDPOSAN VIA SELECTION-SCREEN WITH SELECTION-TABLE itab and RETURN.
*SUPPRESS DIALOG .
SUBMIT RWDPOSAN WITH SELECTION-TABLE sel_tab AND RETURN.
2015 Jul 19 12:58 PM
Hi Sree,
You are not using the Selection table in the right way.
The ABAP Documentation explains it clearly :
... WITH SELECTION-TABLE rspar
Effect
If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify a standard table with row type RSPARAMS and without secondary table keysfor rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
SELNAME (length 😎
KIND (length 1)
SIGN (length 1)
OPTION (length 2)
LOW (length 45)
HIGH (length 45)
To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
KIND must contain the type of selection screen component ("P" for parameters, "S" for selection criteria)
SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
Notes
In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
In your case you also need to delcare the value in your selection screen with the same name of thoses declared in the target program.
For example : The sales organization parameter is declared as PA_VKORG and not SO_VKORG (this is a parameter not a select-option).
Take a look a this code :
TABLES: t001w,
t001l,
mara,
konbbyh,
wakh,
tbtcjob.
DATA sel_tab TYPE TABLE OF rsparams.
DATA ls_itab LIKE LINE OF sel_tab .
SELECTION-SCREEN BEGIN OF BLOCK b1
WITH FRAME TITLE text-001.
SELECT-OPTIONS: pa_vkorg FOR t001w-vkorg,
pa_vtweg FOR t001w-vtweg,
so_werks FOR t001w-werks,
so_bbuy FOR konbbyh-bbynr,
so_matar FOR mara-matnr,
so_matkl FOR mara-matkl,
so_promo FOR wakh-aktnr MATCHCODE OBJECT wakh.
PARAMETERS: pa_dele LIKE edidoc1-syntax DEFAULT ' ' ,
pa_debug LIKE edidoc1-syntax DEFAULT ' '.
PARAMETERS: pa_datab LIKE wpstruc-datum,
pa_datbi LIKE wpstruc-datum DEFAULT '00000000',
pa_job LIKE tbtcjob-jobname.
SELECTION-SCREEN END OF BLOCK b1.
*SUBMIT RWDPOSAN and RETURN.
*SUBMIT RWDPOSAN WITH SELECTION-TABLE itab[] .
*SUBMIT RWDPOSAN USING SELECTION-SETS OF PROGRAM 'Z30_POS_WRAPPER'.
ls_itab-selname = 'SO_BBUY'.
ls_itab-kind = 'S'.
ls_itab-sign = so_bbuy-sign.
ls_itab-option = so_bbuy-option.
ls_itab-low = so_bbuy-low.
ls_itab-high = so_bbuy-high.
APPEND ls_itab TO sel_tab.
ls_itab-selname = 'SO_MATAR'.
ls_itab-kind = 'S'.
ls_itab-sign = so_matar-sign.
ls_itab-option = so_matar-option.
ls_itab-low = so_matar-low.
ls_itab-high = so_matar-high.
APPEND ls_itab TO sel_tab.
ls_itab-selname = 'PA_VKORG'.
ls_itab-kind = 'S'.
ls_itab-sign = pa_vkorg-sign.
ls_itab-option = pa_vkorg-option.
ls_itab-low = pa_vkorg-low.
ls_itab-high = pa_vkorg-high.
APPEND ls_itab TO sel_tab.
ls_itab-selname = 'PA_VTWEG'.
ls_itab-kind = 'S'.
ls_itab-sign = pa_vtweg-sign.
ls_itab-option = pa_vtweg-option.
ls_itab-low = pa_vtweg-low.
ls_itab-high = pa_vtweg-high.
APPEND ls_itab TO sel_tab.
*ls_itab-selname = 'SO_WERKS'.
*ls_itab-kind = 'S'.
**ls_itab-sign = 'I'.
**ls_itab-option = 'EQ'.
**ls_itab-low = 'OR'.
*APPEND ls_itab TO sel_tab.
*ls_itab-selname = 'SO_MATKL'.
*ls_itab-kind = 'S'.
**ls_itab-sign = 'I'.
**ls_itab-option = 'EQ'.
**ls_itab-low = 'OR'.
*APPEND ls_itab TO sel_tab.
*ls_itab-selname = 'SO_PROMO'.
*ls_itab-kind = 'S'.
**ls_itab-sign = 'I'.
**ls_itab-option = 'EQ'.
**
**ls_itab-low = 'OR'.
*APPEND ls_itab TO sel_tab.
ls_itab-selname = 'PA_DELE'.
ls_itab-kind = 'P'.
*ls_itab-sign = 'I'.
*ls_itab-option = 'EQ'.
ls_itab-low = pa_dele.
APPEND ls_itab TO sel_tab.
ls_itab-selname = 'PA_DEBUG'.
ls_itab-kind = 'P'.
*ls_itab-sign = 'I'.
*ls_itab-option = 'EQ'.
ls_itab-low = pa_debug.
APPEND ls_itab TO sel_tab.
ls_itab-selname = 'PA_DATAB'.
ls_itab-kind = 'P'.
*ls_itab-sign = 'I'.
*ls_itab-option = 'EQ'.
ls_itab-low = pa_datab.
APPEND ls_itab TO sel_tab.
ls_itab-selname = 'PA_DATBI'.
ls_itab-kind = 'P'.
*ls_itab-sign = 'I'.
*ls_itab-option = 'EQ'.
ls_itab-low = pa_datbi.
APPEND ls_itab TO sel_tab.
ls_itab-selname = 'PA_JOB'.
ls_itab-kind = 'P'.
*ls_itab-sign = 'I'.
*ls_itab-option = 'EQ'.
ls_itab-low = pa_job.
APPEND ls_itab TO sel_tab.
*****SUBMIT RWDPOSAN WITH SELECTION-TABLE itab.
******SUBMIT RWDPOSAN VIA SELECTION-SCREEN WITH SELECTION-TABLE itab and RETURN.
*SUPPRESS DIALOG .
SUBMIT rwdposan WITH SELECTION-TABLE sel_tab AND RETURN.
Hope it will help you
Regards,
Sam,
2015 Jul 19 1:00 PM
If you want more help take a look at those threads:
USING WITH SELECTION-TABLE rspar | SCN
https://scn.sap.com/thread/1363587
Regards,
Sam,
2015 Jul 19 3:38 PM
Hi sam ,
i wrote the below logic .
when i execute the program its going to standard program , getting an error enter date format correctly .
TABLES: T001W,
T001L,
MARA,
KONBBYH,
WAKH,
tbtcjob.
data sel_tab type TABLE OF rsparams.data ls_itab LIKE LINE OF sel_tab .SELECTION-SCREEN BEGIN OF BLOCK ORGEBENE
WITH FRAME TITLE TEXT-004.PARAMETERS: PA_VKORG LIKE T001W-VKORG,
PA_VTWEG LIKE T001W-VTWEG.SELECT-OPTIONS: SO_FISEL FOR T001L-WERKS.SELECTION-SCREEN END OF BLOCK ORGEBENE.sELECTION-SCREEN BEGIN OF BLOCK ARTICLE
WITH FRAME TITLE TEXT-006.SELECT-OPTIONS: SO_MATAR FOR MARA-MATNR MATCHCODE OBJECT MAT1,
SO_WRGAR FOR MARA-MATKL.SELECTION-SCREEN END OF BLOCK ARTICLE.SELECTION-SCREEN BEGIN OF BLOCK BBUY
WITH FRAME TITLE TEXT-014.*PARAMETERS: PA_BBUY LIKE EDIDOC1-SYNTAX DEFAULT ' '.SELECT-OPTIONS: SO_BBUY FOR KONBBYH-BBYNR.SELECTION-SCREEN END OF BLOCK BBUY.
SELECTION-SCREEN BEGIN OF BLOCK PROMREB
WITH FRAME TITLE TEXT-015. " (Aktionsrabatte)SELECT-OPTIONS: SO_PROMO FOR WAKH-AKTNR MATCHCODE OBJECT WAKH.SELECTION-SCREEN END OF BLOCK PROMREB.
SELECTION-SCREEN BEGIN OF BLOCK TIME_RANGE
WITH FRAME TITLE TEXT-012.PARAMETERS: PA_DATAB LIKE WPSTRUC-DATUM,
PA_DATBI LIKE WPSTRUC-DATUM DEFAULT '00000000'.SELECTION-SCREEN END OF BLOCK TIME_RANGE.SELECTION-SCREEN BEGIN OF BLOCK OPTIONS
WITH FRAME TITLE TEXT-013.PARAMETERS: PA_DELE LIKE EDIDOC1-SYNTAX DEFAULT ' ',
PA_DEBUG LIKE EDIDOC1-SYNTAX DEFAULT ' '.SELECTION-SCREEN END OF BLOCK OPTIONS.
ls_itab-SELNAME = 'PA_VKORG'.
ls_itab-KIND = 'P'.
ls_itab-SIGN = 'PA_VKORG-SIGN'.
ls_itab-OPTION = 'PA_VKORG-OPTION'.
ls_itab-LOW = 'PA_VKORG-LOW'.
ls_itab-HIGH = 'PA_VKORG-HIGH'.APPEND ls_itab to sel_tab.
ls_itab-SELNAME = 'PA_VTWEG'.
ls_itab-KIND = 'P'.
ls_itab-SIGN = 'PA_VTWEG-SIGN'.
ls_itab-OPTION = 'PA_VTWEG-OPTION'.
ls_itab-LOW = 'PA_VTWEG-LOW'.
ls_itab-HIGH = 'PA_VKORG-HIGH'.APPEND ls_itab to sel_tab.
ls_itab-SELNAME = 'SO_FISEL'.
ls_itab-KIND = 'S'.*ls_itab-SIGN = 'SO_FISEL-SIGN'.*ls_itab-OPTION = 'SO_FISEL-OPTION'.*ls_itab-LOW = 'SO_FISEL-LOW'.*ls_itab-HIGH = 'SO_FISEL-HIGH'.*APPEND ls_itab to sel_tab.
ls_itab-SELNAME = 'SO_MATAR'.
ls_itab-KIND = 'P'.*ls_itab-SIGN = 'SO_MATAR-SIGN'.*ls_itab-OPTION = 'SO_MATAR-OPTION'.*ls_itab-LOW = 'SO_MATAR-LOW'.* ls_itab-HIGH = 'SO_MATAR-HIGH'.APPEND ls_itab to sel_tab.
ls_itab-SELNAME = 'PA_DELE'.
ls_itab-KIND = 'P'.**ls_itab-SIGN = 'I'.**ls_itab-OPTION = 'EQ'.
ls_itab-LOW = 'PA_DELE'.APPEND ls_itab to sel_tab.
ls_itab-SELNAME = 'PA_DEBUG'.
ls_itab-KIND = 'P'.**ls_itab-SIGN = 'I'.**ls_itab-OPTION = 'EQ'.
ls_itab-LOW = 'PA_DEBUG'.APPEND ls_itab to sel_tab.
ls_itab-SELNAME = 'PA_DATAB'.
ls_itab-KIND = 'P'.**ls_itab-SIGN = 'I'.**ls_itab-OPTION = 'EQ'.
ls_itab-LOW = 'PA_DATAB'.APPEND ls_itab to sel_tab.
ls_itab-SELNAME = 'PA_DATBI'.
ls_itab-KIND = 'P'.**ls_itab-SIGN = 'I'.**ls_itab-OPTION = 'EQ'.
ls_itab-LOW = 'pa_datbi'.APPEND ls_itab to sel_tab.
ls_itab-SELNAME = 'pa_job '.
ls_itab-KIND = 'P'.**ls_itab-SIGN = 'I'.**ls_itab-OPTION = 'EQ'.
ls_itab-LOW = 'pa_job'.APPEND ls_itab to sel_tab.SUBMIT RWDPOSAN WITH SELECTION-TABLE sel_tab AND RETURN.
2015 Jul 19 3:58 PM
Can you share your code in a text file please.
I cannot see what wrong that way.
Regards,
2015 Jul 19 4:05 PM
2015 Jul 19 4:22 PM
In the SIGN OPTION LOW and HIGH values you need to populate the value of your parameter/select-options and not the text !
2015 Jul 19 4:22 PM
Hi Sree,
Please try this one your passing your selection screen parameters and select options as text to the LS_ITAB-LOW and LS_ITAB-HIGH that is the correct way remove the single quotes it makes the value as text,here i am attaching the changed code please try and revert.
Regards,
Pavan
2015 Jul 19 4:24 PM