Skip to Content

How to fetch the output of Transaction VA45 in ALV program

Hello Guys,

I am in a situation where i need to fetch the the output of a Transaction VA45 into my ALV report,

and i need to use that data in my ALV report.

anyone is aware how to achieve this please help me out in this.

Add a comment
10|10000 characters needed characters exceeded

  • ALV data can be intercepted instead of being displayed by using the class CL_SALV_BS_RUNTIME_INFO. There are many discussions about it in the forum.

    For instance:

    1. Tell ALV engine to store the data instead of displaying it
    2. SUBMIT ALV report AND RETURN
    3. Retrieve ALV data

    Example:

      cl_salv_bs_runtime_info=>set(
        EXPORTING display  = abap_false
                  metadata = abap_false
                  data     = abap_true ).
      SUBMIT ... AND RETURN.
      cl_salv_bs_runtime_info=>get_data_ref(
            IMPORTING r_data = DATA(r_data) ). 

Related questions

1 Answer

  • Posted on Jul 24, 2020 at 04:40 PM

    Hi Naresh,

    In S/4 system, Program for TCode VA45 is Report (TYPE 1) program. So in this case, you can use SUBMIT statement as below:

    SUBMIT SD_SALES_DOCUMENT_VA45 WITH ... EXPORTING LIST TO MEMORY AND RETURN.

    If you are using ECC system, then you program type is M (Module Pool). In this case, you have to use CALL TRANSACTION. Follow the below steps for this:

    1. Since we use Select Options using SET statement and we have select options in VA45 screen, we need to create the recording for VA45 using SHDB and then use CALL TRANSACTION using BDCDATA.

    You can take reference of one of my recording which I had used for my custom transaction requirement:

    2. In the main program of VA45, find an implicit enhancement after ALV display to EXPORT the final internal table into memory.

    EXPORT itab TO MEMORY ID 'TEST_CONTRACT_MEM'.

    3. Now, IMPORT the final table from this memory ID in your custom program after your call transaction statement:

    IMPORT itab FROM MEMORY ID 'TEST_CONTRACT_MEM'.

    Hope this will resolve your issue.

    Regards,

    Gauri Rathi


    2czmy.png (77.2 kB)
    8owe6.png (12.2 kB)
    di11k.png (80.4 kB)
    Add a comment
    10|10000 characters needed characters exceeded

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.