‎2006 Nov 24 11:22 AM
hi firends,
i need to retreive data from table and structure is it possible
eg-- AAA is table having atr no
BBB is strucrure in run time its having some data related to AAA table atrno
i want a select query for this plz some one provide me with example code
but i know structure will not store value.my requirement is for IDOC so structure carries data so ineed to track that
pointe will be rewarded
thanks in advance
raj
‎2006 Nov 24 11:26 AM
Hi,
Can you be more detialed, Table (Database or internal table), Just be more detailed so that you can get the answers quickly.
‎2006 Nov 24 11:27 AM
hi,
as u already have wrote the str wouldnt store any records. the best way to retrieve the data then would be use export/import to memory id. that way u can export the required data to ABAp memory in one program and then import it in ur idoc generation program.
santhosh
‎2006 Nov 24 11:28 AM
You can do a select query from a DB table.
Like you said, there is no data stored in structure as such. it is only available at runtime.
the value in the DB can be put into a structure.
select * from DBTAB into gs_structure
where <cond>.
does this help ?
‎2006 Nov 24 11:37 AM
hi,
i am creating extended idoc with few fields added
so that new fields data are from some table moving to idoc
segment which is an structure.basically data from table moves in single field
for all new fields [field is SDATA] this then its divided for the structure.
so need to track that structure data
regards
raj
‎2006 Nov 24 11:46 AM
hi,
I couldnt make out what you wanted raj,
basically the data is picked up from the DB tables and then concatenated into the SDATA field which is of length 1000, and then the IDOC is sent to the other system along with the struc i.e the segment in the control record.
a split command can be used in the reciever system to split the sdata field into thier respective structure containing the same segment you have passed.
santhosh ( hope this helps).
‎2006 Nov 24 12:00 PM
hi santhosh,
u r almost nearing me
my sdata is having 4 fields value .when i see in idoc its in separate field
my requirment is that sdata value i should display in seperat column using internal table in report
and what is FM for prefix and suffix the mat no.
and vijay can u tell me in which FM i should look in
regards
raj
‎2006 Nov 24 12:09 PM
hi,
create a itab. generally the size of the fields will be thier actual SAP lenghts
data:begin of t_xxx occurs 0,
x1(5) type x1,
x2(6) type x2,
........
.................
end of t_xxx.
then u can
say split idoc-sdata seperated by ' ' into t_xxx-x1
t_xxx-x2.....
try this and let me know.
santhosh
‎2006 Nov 24 11:53 AM
Hi Raj ,
basically addition or deletion of segments the data holds in the data record structure.
all the data pertaining to the idoc is stored and processed
in the structures
EDIDC--> Control Records.
EDIDD --> Data srecords.
goto se37 and enter the FM name
f7
u 'll see
TABLES
*" IDOC_CONTRL STRUCTURE EDIDC
*" IDOC_DATA STRUCTURE EDIDD
now if i want to know the data this is is structure EDIDD now in itab
IDOC_DATA.
BREAK-POINT.
LOOP AT IDOC_DATA.
ITAB-F1 = ID0C_DATA-F1.
ITAB-F2 = ID0C_DATA-F2.
ITAB-F3 = ID0C_DATA-F3.
APPEND ITAB.
CLEAR ITAB.
ENDLOOP.
this way u can fetch the data .
regards,
VIjay
‎2006 Nov 24 12:08 PM
that u have to tell us ..
it is just like for message type matmas
the idoc is idoc_input_matmas .
now goto ur message type
tcode we57
give ur message type over here
and it will give u the fm for that ..
and steps follow the prev post of mine.
regards,
vijay