Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9236

HI Friends i am trying to display two table contents i am getting one table fields but not the second, help me with this

$
0
0

TABLES: VBAK.

CONSTANTS: INF_MSG TYPE C VALUE 'I'.

TYPES: BEGIN OF ST_VBAK,

        VBELN TYPE VBELN_VA,

        VKORG TYPE VKORG,

        KUNNR TYPE KUNNR,

        END OF ST_VBAK,

 

        BEGIN OF ST_VBAP,

        VBELN TYPE VBELN_VA,

        POSNR TYPE POSNR_VA,

        MATNR TYPE MATNR,

        END OF ST_VBAP,

 

        BEGIN OF ST_KNA1,

        KUNNR TYPE KUNNR,

        NAME1 TYPE NAME1,

        END OF ST_KNA1.

DATA:IT_VBAK TYPE STANDARD TABLE OF ST_VBAK INITIAL SIZE 1,

      IT_VBAP TYPE STANDARD TABLE OF ST_VBAP INITIAL SIZE 1,

      IT_KNA1 TYPE STANDARD TABLE OF ST_KNA1 INITIAL SIZE 1,

      WA_VBAK TYPE ST_VBAK,

      WA_VBAP TYPE ST_VBAP,

      WA_KNA1 TYPE ST_KNA1.

*AT SELECTION-SCREEN.

SELECT-OPTIONS: SO_VBELN FOR VBAK-VBELN,

                SO_KUNNR FOR VBAK-KUNNR.

 

START-OF-SELECTION.

SELECT VBELN VKORG KUNNR

  FROM VBAK

  INTO TABLE IT_VBAK

  WHERE VBELN IN SO_VBELN AND

        KUNNR IN SO_KUNNR.

  IF SY-SUBRC <> 0.

  MESSAGE TEXT-001 TYPE INF_MSG.

  LEAVE LIST-PROCESSING.

  ENDIF.

IF IT_VBAK IS NOT INITIAL.

SELECT VBELN POSNR MATNR

  FROM VBAP

  INTO TABLE IT_VBAP

  FOR ALL ENTRIES IN IT_VBAK

  WHERE VBELN = IT_VBAK-VBELN.

ENDIF.

 

as i debug, i am getting fields of one table as i go to the second table, i am going to this screen


Viewing all articles
Browse latest Browse all 9236

Trending Articles