cancel
Showing results for 
Search instead for 
Did you mean: 

internal table & call transaction

Former Member
0 Kudos

hi guis,

There is any possible to declare internal table with in internal table if it possible how?

How to see errorlogs in call transaction ,if u r not using error parameter how

Thanks&Regards

Rams

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Do mean to declare internal table within an internal table?

No. But you could declare components within internal table:

DATA: BEGIN OF itab,
       itab1 LIKE mara,
       itab2 LIKE vbak,
      END OF itab.

vinod_gunaware2
Active Contributor
0 Kudos

call transaction errorlogs

DATA : BEGIN OF T_DOWNLOAD OCCURS 0,

MATNR LIKE MARA-MATNR,

MAKTX LIKE MAKT-MAKTX,

PLANT LIKE RMMG1-WERKS,

MSG(200),

END OF T_DOWNLOAD.

DATA : T_BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE.

DATA : WA_BDCMSGCOLL TYPE BDCMSGCOLL.

DATA : ERR_LOG TYPE MESSAGE.

DATA : N TYPE I. "#EC *

DATA : T_BDCDATA LIKE BDCDATA OCCURS 6 WITH HEADER LINE.

DATA : WA_CTU_PARAMS TYPE CTU_PARAMS.

  • Set the parameters for Call Transaction

CLEAR WA_CTU_PARAMS.

WA_CTU_PARAMS-DISMODE = 'N'.

WA_CTU_PARAMS-UPDMODE = 'S'.

WA_CTU_PARAMS-NOBINPT = 'X'.

WA_CTU_PARAMS-NOBIEND = 'X'.

WA_CTU_PARAMS-DEFSIZE = 'X'.

  • Call Transaction MM01

IF W_FLAG NE 'X'.

CALL TRANSACTION 'MM01' USING T_BDCDATA OPTIONS FROM WA_CTU_PARAMS

MESSAGES INTO T_BDCMSGCOLL.

COMMIT WORK AND WAIT.

DESCRIBE TABLE T_BDCMSGCOLL LINES N.

IF N <> 0.

LOOP AT T_BDCMSGCOLL INTO WA_BDCMSGCOLL.

CLEAR ERR_LOG.

W_MSGNO = WA_BDCMSGCOLL-MSGNR.

CALL FUNCTION 'WRITE_MESSAGE'

EXPORTING

MSGID = WA_BDCMSGCOLL-MSGID

MSGNO = W_MSGNO

MSGTY = WA_BDCMSGCOLL-MSGTYP

IMPORTING

MESSG = ERR_LOG.

  • Error that occurs during transactoon

IF ERR_LOG-MSGTY = 'E'.

MOVE-CORRESPONDING T_UPLOAD TO T_DOWNLOAD.

MOVE ERR_LOG-MSGTX TO T_DOWNLOAD-MSG.

APPEND T_DOWNLOAD.

ENDIF.

ENDLOOP.

ENDIF.

ENDIF.

regards

vinod

Former Member
0 Kudos

Rams,

Yes you can declare a internal table with in another one. These are called nested internal tables.

itab

field type c

field type table

When you use a call transaction all your messages are logged into BDCMSGCOLL table.

Regards,

Ravi

Former Member
0 Kudos

Rams,

Here is a good example of nested internal table.

Begin of itab,

field type ebeln,

text type TLINE_T,

end of itab.

Now, what you need to observe here is TLINE_T is table type and is internal table by itself. That means for one row of field you can have multiple rows in text column as it is table by itself.

Regards,

Ravi

Note : Please mark the helpful answers.

Former Member
0 Kudos

HI Rams,

you can use an Itab within an Itab like this..

 data : itab like table of vbak with header line.
data : begin of itab1 occurs 0.
       include structure itab.
data : end of itab1.
      

2. after CALL TRANSACTION..

use messtab ..

    CALL TRANSACTION TCODE USING BDCDATA
                     MODE   CTUMODE
                     UPDATE CUPDATE
                     MESSAGES INTO<b> MESSTAB</b>.

loop at messtab and find all the messages..

regards

satesh