Skip to Content

How to read a offset of bapi_marax?

Hello Experts,

I have a case where i have the structure bapi_marax which hold the fields and their corresponding offset value i.e. 'X'.

now after using function module "DDIF_TABL_GET" i am getting list of fields and check for all the fields who has the value x.

after the function module we get the list of field not the value so while looping how we read the corresponding field value.

like FM DDIF_TABL_GET give itab which has all the field.

Loop at itab into wa.

now wa-rollname has the field name and i need to read the structure bapi_marax to get the offset value either X or not.

how can we do this...


I did not get any class/method for this.

Please help.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Oct 07, 2010 at 05:38 PM

    There are multiple ways to do it. One simple option is

    WHILE sy-subrc EQ 0.
      ASSIGN COMPONENT sy-index OF STRUCTURE bapi_marax TO <fs_field>.
      CHECK <fs_field> EQ 'X'.
      READ TABLE itab INDEX sy-index.
      WRITE itab-fieldname.

    Add a comment
    10|10000 characters needed characters exceeded

    • Thanks Brod,

      This looks convincing to me and works very well as per my need. thanks alot for the support.

      Out of my curiosity i would like to know the other way to do the same. Please let me know what other way we have to do it as i am looking for some more option with much better performance.

      Thanks again.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.