Application Development and Automation 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: 
Read only

CALL Transaction

Former Member
0 Likes
712

Hi,

Is it posible to get status message using call transaction.

For ex, CALL TRANSACTION 'VK12' and skip first screen.

In report program i'm using

CALL TRANSACTION 'VK12' and skip first screen.

If any error occured i want to capture in report

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
670

Hi,

You can not capture meesage using call transaction without bdc option.

Use the <b>MESSAGES into IT_MESSAGES</b> addition.

IT_MESSAGES should be of type BDCMSGCOLL.

Then you can loop at the internal table IT_MESSAGES and display the messages using the FM: FORMAT_MESSAGE.

REgards,

Ravi

P.S: But you must pass a BDCDATA internal table as well.

5 REPLIES 5
Read only

Former Member
0 Likes
670

hi,

try :


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

      CALL TRANSACTION 'ME21' USING WT_BDCTRANS MODE 'N' UPDATE 'S'
                              MESSAGES INTO WT_MESSTAB.

erwan

Read only

Former Member
0 Likes
670
there is option in CALL transaction to capture that

        ..... MESSAGES INTO itab

Effect        Any messages that occur during CALL TRANSACTION USING ... are
              collected in the specified internal table. The internal table
              must have the structure BDCMSGCOLL.

Example
              DATA: BDCDATA TYPE TABLE OF BDCDATA.

              DATA: ITAB TYPE TABLE OF BDCMSGCOLL.

              DATA: PROGRAM LIKE SY-REPID,
                    WA_BDCDATA TYPE BDCDATA.

              WA_BDCDATA-PROGRAM  = 'SAPMS38M'.
              WA_BDCDATA-DYNPRO   = '0100'.
              WA_BDCDATA-DYNBEGIN = 'X'.
              APPEND WA_BDCDATA TO BDCDATA.
              CLEAR WA_BDCDATA.
              WA_BDCDATA-FNAM     = 'RS38M-PROGRAMM'.
              WA_BDCDATA-FVAL     = PROGRAM.
              APPEND WA_BDCDATA TO BDCDATA.
              ...
              CALL TRANSACTION 'SE38'  USING BDCDATA  MODE 'N'
                                       MESSAGES INTO ITAB.
Read only

Former Member
0 Likes
670

Have you looked at the help fo CALL TRANSACTION to see what BDC options you can specify?

Gareth.

Read only

Former Member
0 Likes
670

Use the <b>MESSAGES into IT_MESSAGES</b> addition.

IT_MESSAGES should be of type BDCMSGCOLL.

Then you can loop at the internal table IT_MESSAGES and display the messages using the FM: FORMAT_MESSAGE.

REgards,

Ravi

P.S: But you must pass a BDCDATA internal table as well.

Read only

Former Member
0 Likes
671

Hi,

You can not capture meesage using call transaction without bdc option.