Showing posts with label #corresponding field of. Show all posts
Showing posts with label #corresponding field of. Show all posts

Monday, 30 May 2016

Corresponding fields of Table

Corresponding fields of Table

  • Corresponding fields of table keyword used to place the selected  fields from database into corresponding fields of Internal Table.
  • Keyword : Corresponding fields of  Table.

Ex :

Steps

  1. Go to transaction code SE38.
  2. Enter the program name Z or Y<program name>
  3. Select attribute type as Executable program.
  4. Click on Save.

Source Code

TYPES : BEGIN OF TY_VBRP,
        VBELN TYPE VBRP-VBELN,
        POSNR TYPE  VBRP-POSNR,
        MATNR TYPE VBRP-MATNR,
        ARKTX TYPE VBRP-ARKTX,
     END  OF TY_VBRP.

DATA : WA TYPE TY_VBRP,
       IT TYPE TABLE OF TY_VBRP.

SELECT-OPTIONS : S_VBELN FOR WA-VBELN.

SELECT *  FROM VBRP INTO CORRESPONDING FIELDS OF TABLE IT WHERE   VBELN IN S_VBELN.

  LOOP AT IT INTO WA.

    WRITE : / WA-VBELN , WA-POSNR , WA-MATNR , WA-ARKTX.

  ENDLOOP.




Input



Output







Saturday, 28 May 2016

Corresponding fields of

Corresponding fields of

  • Corresponding fields of keyword used to place the selected fields from the database into corresponding fields of Work Area. 
  • Keyword: Corresponding fields of


Steps

  1. Go to transaction code SE38.
  2. Enter the program name Z or Y<program name>
  3. Select attribute type as Executable program.
  4. Click on Save.

Source Code


DATA : WA_MAKT TYPE MAKT.

PARAMETERS : P_MATNR TYPE MAKT-MATNR.


SELECT SINGLE MATNR SPRAS MAKTX FROM MAKT INTO CORRESPONDING FIELDS OF
WA_MAKT WHERE MATNR = P_MATNR.


  WRITE : / WA_MAKT-MATNR , WA_MAKT-SPRAS , WA_MAKT-MAKTX.



Input



Output