2017 Jan 09 12:36 PM
TYPES : BEGIN OF ty_ldb_data,
perno TYPE persno,
start_date TYPE begda,
end_date TYPE endda.
INCLUDE STRUCTURE p0000.
INCLUDE STRUCTURE p0001.
INCLUDE STRUCTURE p0002.
INCLUDE STRUCTURE p0007.
INCLUDE STRUCTURE p2001.
INCLUDE STRUCTURE p2002.
INCLUDE STRUCTURE p2003.
TYPES: END OF ty_ldb_data.
DATA : lt_ldb_data TYPE STANDARD TABLE OF ty_ldb_data,
ls_ldb_data TYPE ty_ldb_data.
I am receiving an compilation error that PERNR already exists.
Is their a way to have a single internal table with all the infotypes in it.
if yes then how should i store Multiple lines into those Tables.
ls_ldb_data-P0000 = P000[]. <= would this statement work.
append ls_ldb_data to lt_ldb_data.
thanks
2017 Jan 09 2:04 PM
Hello Rajat,
You are receiving error because the multiple structure in your local structure have PERNR field. to avoid this you can create and ZSTRUCTURE or Local Structure in which you include multiple PERNER as PERNR_1 , PERNR_2 , .........PERNR_N with required fields and use that to create your internal table.
2017 Jan 09 2:37 PM
Why would you EVER do this? Why do you need this "super table" of everything in one row/entry? In some cases, it won't even make sense. What problem are you actually trying to solve?
2017 Jan 09 2:42 PM
You could use one disambiguating option of the INCLUDE statement like 'RENAMING WITH SUFFIX suffix'. You could also use the 'AS name' also to easily map data read from database.
Regards,
Raymond