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: 

call transaction with passing input data on selection screen

Former Member
0 Kudos

Hi all

I want to call transaction WE19 from Program and pass idoc Number to selection screen.

Is it possible?

Tell me in details about Code?

1 ACCEPTED SOLUTION

Sandeep_Kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos

yes it is.

Check call transaction 'X' with bdc_options.

8 REPLIES 8

Former Member
0 Kudos

Try F1 on CALL TRANSACTION....u will get all the required data.

Search SDN on the same keywords..lot of threads...

Sandeep_Kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos

yes it is.

Check call transaction 'X' with bdc_options.

0 Kudos

BDC_OPTION how i passed Idoc number as Input data?.

Threads are not that much explainatory

Sandeep_Kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos

What i meant by bdc_option is if you use F1 on call transaction you can find that we can pass scrren number program name etc with inouty filed values while callinga transaction.

0 Kudos

Hi sandeep thanks for reply

But F1 help isf for SE38 which run on one Report program.But we19 run on module pool. can you please pass which field should i pass for BDC for We19 and provide me piece of code.

from F1 help I am not getting clear idea

0 Kudos

This is an Example for WE19:



PARAMETER NUM_IDOC LIKE MSED7START-EXIDOCNUM.


DATA:  BEGIN  OF  TB_BDC              OCCURS 0.
        INCLUDE STRUCTURE BDCDATA.
DATA:  END    OF  TB_BDC.

DATA:  BEGIN  OF  TB_MSG_CT      OCCURS 0.
        INCLUDE STRUCTURE BDCMSGCOLL.
DATA:  END    OF  TB_MSG_CT.

PERFORM BDC USING:
  'X'  'SAPMSED7' '0010',
  ' ' 'MSED7START-EXIDOCNUM' NUM_IDOC,
  ' ' 'MSED7START-SEL_EXIDOC' 'X',
  ' ' 'BDC_OKCODE' '=CREA',
  ' ' 'BDC_CURSOR' 'MSED7START-EXIDOCNUM'.


PERFORM CALL.


FORM CALL.

  CALL TRANSACTION 'WE19'
   USING  TB_BDC
   MODE   'A'
   UPDATE 'S'
   MESSAGES INTO TB_MSG_CT.

ENDFORM.                    "CALL


FORM  BDC USING DYNBEGIN   NAME   VALUE.

  CLEAR TB_BDC.
  IF DYNBEGIN   =   'X'.
    MOVE DYNBEGIN    TO    TB_BDC-DYNBEGIN.
    MOVE NAME        TO    TB_BDC-PROGRAM.
    MOVE VALUE       TO    TB_BDC-DYNPRO.
  ELSE.
    MOVE NAME        TO    TB_BDC-FNAM.
    MOVE VALUE       TO    TB_BDC-FVAL.
  ENDIF.

  APPEND TB_BDC.

ENDFORM.                    "BDC

Angelo.

0 Kudos

HI

Last question

If i want to skip first screen while calling transaction WE19

then what will be code?

0 Kudos

hi!

Press F1 on call transaction you will see all the options

call TRANSACTION 'WE19' AND SKIP FIRST SCREEN

thanks