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: 

Use call transaction or submit statement

Former Member
0 Kudos

Hi, i have a complex transaction, it has two control programs, a Z program and a standard program. I need execute it by call transaction or submit statement. In this transaction there are some select-options that i want fill with specific values.

Can you help me with it?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can fill the select-options submit the program like that.

SUBMIT zsdp0050 AND RETURN

WITH s_period1 IN s_period2.

s_period1 is a select-options in the program zsdp0050.

s_period2 have the same structure of s_period1.

16 REPLIES 16

Former Member
0 Kudos

You can fill the select-options submit the program like that.

SUBMIT zsdp0050 AND RETURN

WITH s_period1 IN s_period2.

s_period1 is a select-options in the program zsdp0050.

s_period2 have the same structure of s_period1.

Former Member
0 Kudos

Hi,

Here is a sample code for SUBMIT statement which works.

You can use this to fix MM03 issue.

submit ztest to sap-spool keep in spool 'X'

without spool dynpro

with s_matnr in r_matnr

with s_mtart in r_mtart

and return.

Here s_matnr and s_mtart are select options in selection screen of program ZTEST. These are getting populated by ranges r_matnr and r_mtart.

Former Member
0 Kudos

You can do something Like:

SUBMIT Zreport WITH S_PROJ IN SO_PROJ

WITH S_PSP IN SO_PSP

WITH S_ISTAT IN SO_ISTAT

WITH S_ESTAT IN SO_ESTAT

EXPORTING LIST TO MEMORY

AND RETURN.

Former Member
0 Kudos

thanks for your answers. The problem is it transaction has two programs, the transaction's dynpros are divided in both z program as standar program. how solve it?

0 Kudos

Hi Marcel,

I think you may be having problems building the screenflow to call the transaction.

You can start transaction SHDB and then record a run of your transaction in that.

This can be generated into a program which will give you a basic structure to work from.

Check this address for documentation on the tool:

http://help.sap.com/erp2005_ehp_03/helpdata/EN/67/42fcd5f61011d1bcf9080009b4534c/frameset.htm

Hope that helps

Former Member
0 Kudos

Hi Robin, the SHDB transaction was very useful. Now i have other problem. This transaction execute a jobs set.I already have filled all of fields in the transaction, i saved the parameters for the execution by SAVE button (BDC_OKCODE=SAVE), but the transaction don't release the jobs and must do it. The last action (to release the jobs set) is executed by the OK button(BDC_OKCODE=OK).

This is the code that i'm implementing:

REPORT  ZPRUEBA_SALDOS_ANTERIORES     .

DATA: BDCDATA TYPE TABLE OF BDCDATA.
DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
DATA: WA_ITAB TYPE BDCMSGCOLL.
DATA: PROGRAM LIKE SY-REPID ,
      WA_BDCDATA TYPE BDCDATA.
DATA: DATE_ID(10).
DATA: DATE_CONV(11).
DATA: T_ID(6).
DATA: DES_ERROR(500).


*"parametro zdo(para tipo de documentos)
*RANGES: R_BLART FOR DFKKOP-BLART,
*        R_VKONT FOR FKKVKP-VKONT.

*INITIALIZATION.




START-OF-SELECTION.


  CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
       EXPORTING
            INPUT  = SY-DATUM
       IMPORTING
            OUTPUT = DATE_CONV.


  DATE_ID = SY-DATUM.
CONCATENATE DATE_ID+6(2) '.' DATE_ID+4(2) '.' DATE_ID+0(4) INTO DATE_ID.
  CONCATENATE DATE_CONV+3(3) '_' DATE_CONV+0(2) INTO T_ID.


  WA_BDCDATA-PROGRAM = 'SAPLFKKAKTIV2'.
  WA_BDCDATA-DYNPRO  = '1000'.
  WA_BDCDATA-DYNBEGIN = 'X'.
  APPEND WA_BDCDATA TO BDCDATA.

  CLEAR WA_BDCDATA.
  WA_BDCDATA-FNAM = 'FKKAKTIV2_DYNP_1000-LAUFD'.
  WA_BDCDATA-FVAL = '11.06.2008'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'FKKAKTIV2_DYNP_1000-LAUFI'.
  WA_BDCDATA-FVAL = 'MAR_38'.
  APPEND WA_BDCDATA TO BDCDATA.



  CLEAR WA_BDCDATA.
*  WA_BDCDATA-PROGRAM = 'SAPLZ_CL_PROCESOS_EN_MASA'.
  WA_BDCDATA-PROGRAM = 'SAPLFKKAKTIV2'.
*  WA_BDCDATA-DYNPRO  = '1001'.
  WA_BDCDATA-DYNPRO  = '1000'.
  WA_BDCDATA-DYNBEGIN = 'X'.
  APPEND WA_BDCDATA TO BDCDATA.

  WA_BDCDATA-FNAM = 'P_STICHT'.
  WA_BDCDATA-FVAL = DATE_ID.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'S_BUKRS-LOW'.
  WA_BDCDATA-FVAL = 'PCS'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'S_VKONT-LOW'.
  WA_BDCDATA-FVAL = '0'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'S_VKONT-HIGH'.
  WA_BDCDATA-FVAL = '999999999999'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'BDC_OKCODE'.
  WA_BDCDATA-FVAL = '=%01410010001580545'.
  APPEND WA_BDCDATA TO BDCDATA.



  CLEAR WA_BDCDATA.
  WA_BDCDATA-PROGRAM = 'SAPLALDB'.
  WA_BDCDATA-DYNPRO  = '3000'.
  WA_BDCDATA-DYNBEGIN = 'X'.
  APPEND WA_BDCDATA TO BDCDATA.

*  CLEAR WA_BDCDATA.
  WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(01)'.
  WA_BDCDATA-FVAL = 'BS'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(02)'.
  WA_BDCDATA-FVAL = 'FS'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(03)'.
  WA_BDCDATA-FVAL = 'CD'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(04)'.
  WA_BDCDATA-FVAL = 'EF'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(05)'.
  WA_BDCDATA-FVAL = 'TR'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(06)'.
  WA_BDCDATA-FVAL = 'TF'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(07)'.
  WA_BDCDATA-FVAL = 'TC'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(08)'.
  WA_BDCDATA-FVAL = 'LP'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'RSCSEL-SLOW_I(09)'.
  WA_BDCDATA-FVAL = 'NC'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'BDC_OKCODE'.
  WA_BDCDATA-FVAL = '=ACPT'.
  APPEND WA_BDCDATA TO BDCDATA.



  CLEAR WA_BDCDATA.
*  WA_BDCDATA-PROGRAM = 'SAPLZ_CL_PROCESOS_EN_MASA'.
  WA_BDCDATA-PROGRAM = 'SAPLFKKAKTIV2'.
*  WA_BDCDATA-DYNPRO  = '1001'.
  WA_BDCDATA-DYNPRO  = '1000'.
  WA_BDCDATA-DYNBEGIN = 'X'.
  APPEND WA_BDCDATA TO BDCDATA.

  CLEAR WA_BDCDATA.
  WA_BDCDATA-FNAM = 'BDC_OKCODE'.
  WA_BDCDATA-FVAL = '=TAB03'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'BDC_OKCODE'.
  WA_BDCDATA-FVAL = '=PRPRN'.
  APPEND WA_BDCDATA TO BDCDATA.



  CLEAR WA_BDCDATA.
  WA_BDCDATA-PROGRAM = 'SAPLSPRI'.
  WA_BDCDATA-DYNPRO  = '0100'.
  WA_BDCDATA-DYNBEGIN = 'X'.
  APPEND WA_BDCDATA TO BDCDATA.

  CLEAR WA_BDCDATA.
  WA_BDCDATA-FNAM = 'PRI_PARAMS-PDEST'.
  WA_BDCDATA-FVAL = 'LOCAL'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'PRI_PARAMS-PLIST'.
  WA_BDCDATA-FVAL = '1604_SA_16'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'BDC_OKCODE'.
  WA_BDCDATA-FVAL = '=SAVE'.
  APPEND WA_BDCDATA TO BDCDATA.



  CLEAR WA_BDCDATA.
  WA_BDCDATA-PROGRAM = 'SAPLFKKAKTIV2'.
  WA_BDCDATA-DYNPRO  = '1000'.
  WA_BDCDATA-DYNBEGIN = 'X'.
  APPEND WA_BDCDATA TO BDCDATA.

*  CLEAR WA_BDCDATA.
  WA_BDCDATA-FNAM = 'BDC_OKCODE'.
  WA_BDCDATA-FVAL = '=TAB04'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'FKKAKTIV2_DYNP_1190-VARI'.
  WA_BDCDATA-FVAL = 'INTERES'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'FKKAKTIV2_DYNP_1200-JOBS_LOAD_BALA'.
  WA_BDCDATA-FVAL = '6'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'BDC_OKCODE'.
  WA_BDCDATA-FVAL = '=SAVE'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'BDC_OKCODE'.
  WA_BDCDATA-FVAL = '=DISP'.
  APPEND WA_BDCDATA TO BDCDATA.



  CLEAR WA_BDCDATA.
  WA_BDCDATA-PROGRAM = 'SAPLFKJO_JOB'.
  WA_BDCDATA-DYNPRO  = '0100'.
  WA_BDCDATA-DYNBEGIN = 'X'.
  APPEND WA_BDCDATA TO BDCDATA.

  CLEAR WA_BDCDATA.
  WA_BDCDATA-FNAM = 'D100_FIELDS-XBACKGR'.
  WA_BDCDATA-FVAL = 'X'.
  APPEND WA_BDCDATA TO BDCDATA.
  WA_BDCDATA-FNAM = 'D100_FIELDS-XIMMEDIATE'.
  WA_BDCDATA-FVAL = 'X'.
  APPEND WA_BDCDATA TO BDCDATA.

  WA_BDCDATA-FNAM = 'BDC_OKCODE'.
  WA_BDCDATA-FVAL = '=OK'.
  APPEND WA_BDCDATA TO BDCDATA.
 ...
  CALL TRANSACTION 'ZPSA' USING BDCDATA  MODE 'A'
                           MESSAGES INTO ITAB.

Edited by: Marcel ochoa on Jun 12, 2008 5:01 PM

Edited by: Marcel ochoa on Jun 12, 2008 5:03 PM

Edited by: Marcel ochoa on Jun 12, 2008 5:06 PM

Edited by: Marcel ochoa on Jun 12, 2008 10:43 PM

Edited by: Marcel ochoa on Jun 12, 2008 10:45 PM

Edited by: Marcel ochoa on Jun 12, 2008 11:37 PM

0 Kudos

Is impossible to know what happens from your code because the programs are customs.

You are in mode A. Do you see all the screens or does it stop after certain Ok_code?

Former Member
0 Kudos

Hi Ramiro, I see all of screen.

0 Kudos

If you see all the screens then what is the problem?

Do you get any message?

Former Member
0 Kudos

the call transaction perform the entery process, but at the end it should release a jobs set but not do it.

In the code you can see it before call transaction statement.

0 Kudos

Did you tried the same steps in SHDB?

Does it work there?

If you do the same thing in your transaction manually does it works?

Former Member
0 Kudos

I don't get message, the sy-subrc = 0 after the call transaction.

I don`t understand. It should release the jobs.

Former Member
0 Kudos

the transaction manually work fine. I use the SHDB transaction, this generated a code that when i execute get errors. I fixed some statements and after i create my program. this program run fine except why dont release the jobs, but it save all of parameters to execute the jobs.

Former Member
0 Kudos

the transaction manually work fine. I use the SHDB transaction, this generated a code that when i execute get errors. I fixed some statements and after i create my program. this program run fine except why dont release the jobs, but it save all of parameters to execute the jobs.

Former Member
0 Kudos

I am tryng to execute other transaction that also release jobs and dont release these jobs.

is there some problem between the call transaction statement and the jobs?.

Former Member
0 Kudos

Hi Marcel,

I'm having the same problem as well. Did you manage to solve it?

Could you share on how to solve it?

Thanks.

Cheers