Teknologi

LightBlog

Breaking

LightBlog

Friday, 2 April 2021

Get stack value SYSTEM_CALLSTACK

This example, is using two programs, where the second is accessing variables of the first program. Basically just notice that we are using the program name and the variable name when assigning the field symbol.

report zrich_0006 .


tables: mara.

parameters: p_matnr type mara-matnr..

data: matnr type mara-matnr.
data: imarc type table of marc with header line.

matnr = p_matnr.
select * from marc into table imarc up to 10 rows
               where matnr = p_matnr.

perform in in program zrich_0007.
report zrich_0007 .

*---------------------------------------------------------------------*
*       FORM in                                                       *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
form in.

  data: field(50).
  data: xmarc type marc.

  field-symbols: <matnr>.
  field-symbols: <imarc> type marc_upl_tt.

* Assign an individual variable
  field = '(ZRICH_0006)matnr'.
  assign (field) to <matnr>.

* Assign an internal table
  field = '(ZRICH_0006)IMARC[]'.
  assign (field) to <imarc>.

* Write out your data
  write <matnr>.

  loop at <imarc> into xmarc.
    write: / xmarc-werks.
  endloop.

endform.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Adbox