Skip to Content
author's profile photo Former Member
Former Member

a big riddle for me

One think is a big riddle for me.

How do you pair all these datas together from

return tables of the Function Modul in order

to distunguish them. Which line from itab

belongs to which line form the next itab etc.

l_api_invpersons_tab
l_api_affpersdat_tab
l_api_injuries_tab
l_api_iava_tab
l_api_iaprop_data_tab
l_api_ipva_tab
l_api_ipprop_data_tab

This is a common problem for me generally.

How can make for example a big result table

with all these datas.

Is there a solution or way existing. Or how do

you solve problems ?

Regards

ilhan

call function 'CBIH_IA30_IAL_READ'
    exporting
     i_scenario                        = espap_base_scenario-all_display
     i_addinf                          = l_addinf
     i_flg_header                      = esp1_true
     i_flg_invpers                     = esp1_true
     i_flg_affpers                     = esp1_true
     i_flg_injuries                    = esp1_true
     i_flg_ia_val                      = esp1_true
     i_flg_ip_val                      = esp1_true
     i_flg_read_all_charact            = esp1_true
    tables
     x_api_header_tab                  = l_api_header_tab
     x_api_invpersons_tab              = l_api_invpersons_tab
     e_api_affpersdat_tab              = l_api_affpersdat_tab
     e_api_injuries_tab                = l_api_injuries_tab
     e_api_iava_tab                    = l_api_iava_tab
     e_api_iaprop_data_tab             = l_api_iaprop_data_tab
     e_api_ipva_tab                    = l_api_ipva_tab
     e_api_ipprop_data_tab             = l_api_ipprop_data_tab
    exceptions
     no_object_specified               = 1
     parameter_error                   = 2
     internal_error                    = 3
     convmode_set_failed               = 4
     interval_access_error             = 5
     others                            = 6.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 11:23 AM

    well have a look at the fields of the return tables, normally thereĀ“s always a link through common fields.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 11:40 AM

    How can I concatenate this tables in a one common table ?

    Regards

    ertas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 11:45 AM

    Hi,

    Create a common table.

    Loop at the header table.

    Populate header fields in the common table.

    Loop at the item table.

    Populate the item specific fields in the common table.

    Append the entry to common table.

    Clear item specific fields.

    Endloop.

    Clear the header specific fields.

    Endloop.

    Thanks and Regards,

    Lakshmi.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 11:49 AM

    Santhanalakshmi can you please show me that with abap code example ?

    I think you have almost solved my problem.

    Regards

    ertas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 12:06 PM

    Here is the code sample:

    DATA: Begin of it_header occurs 0,

    VBELN type VBAK-VBELN,

    AUDAT type VBAK-AUDAT,

    VBTYP type VBAK-VBTYP,

    AUART type VBAK-AUART,

    SPART type VBAK-SPART,

    end of it_header.

    Data: begin of it_item occurs 0,

    VBELN type VBAK-VBELN,

    POSNR type VBAP-POSNR,

    MATNR type VBAP-MATNR ,

    CHARG type VBAP-CHARG,

    MATKL type VBAP-MATKL,

    end of it_item.

    types: begin of tt_output ,

    VBELN type VBAK-VBELN,

    AUDAT type VBAK-AUDAT,

    VBTYP type VBAK-VBTYP,

    AUART type VBAK-AUART,

    SPART type VBAK-SPART,

    POSNR type VBAP-POSNR,

    MATNR type VBAP-MATNR ,

    CHARG type VBAP-CHARG,

    MATKL type VBAP-MATKL,

    end of tt_output.

    DATA: it_output type standard table of tt_output,

    wa_output type tt_output.

    • logic to populate the header table

    • logic to populate the item table

    Loop at it_header.

    wa_output-vbeln = it_header-vbeln.

    wa_output-AUDAT = it_header-audat.

    wa_output-VBTYP = it_header-VBTYP.

    wa_outputAUART = it_header-AUART.

    wa_output-SPART = it_header-SPART.

    loop at it_item where vbeln = it_header-vbeln.

    wa_output-POSNR = it_header-POSNR,

    wa_output MATNR = it_header-MATNR ,

    wa_output-CHARG = it_header-CHARG,

    wa_output-MATKL= it_header-MATKL,

    append wa_output to it_output.

    CLEAR: wa_output-posnr, wa_output-matnr, wa_output-charge, wa_output-matkl.

    endloop.

    clear wa_output.

    endloop.

    Thanks and Regards,

    Lakshmi.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 12:21 PM

    Santhanalakshmi V

    can you pls use the real fields from FM as a courtesy to me.

    Regards

    ertas

    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.