‎2008 Oct 01 11:08 AM
hello ,
Declarations
TYPES:BEGIN OF gt_cr_det,
labor LIKE mara-labor,
maktx LIKE makt-maktx,
text LIKE stzu-ztext,
END OF gt_cr_det.
data: gt_created_details TYPE gt_cr_det OCCURS 0 WITH HEADER LINE.
ive got 2 statements
SELECT mara~labor
makt~maktx
INTO TABLE
gt_table
FROM mara
INNER JOIN makt ON
maramatnr = maktmatnr
WHERE mara~matnr = <fs>-matnr.
SELECT SINGLE
ztext
INTO gv_text
FROM stzu
WHERE stlnr = <fs>-stlnr.
gt_created_details-text = gv_text.
MODIFY gt_created_details.
when i execute its dumping.
the reason ive done like this..i cant use this 3 tables in one join coz therez no common fields...would you please suggest me to overcome this bug.
thanks
Edited by: BrightSide on Oct 1, 2008 11:08 AM
‎2008 Oct 01 11:13 AM
hi,
use modify gt_created_details transporting text.
Rgds.,
subash
‎2008 Oct 01 11:13 AM
Are there any entries in your internal table before you are using MODIFY statement ? You aren't popultatin the other fields of your internal table work area before modifying not I can see any insert statement to insert records into the internal table.
If you have, then you would need to specify the index of the internal table where the record should be updated.
Look for F1 help for MODIFY (internal tables )
regards,
Advait
Edited by: Advait Gode on Oct 1, 2008 12:13 PM
‎2008 Oct 01 11:18 AM
U need to give index while modifying and use modify statement within loop.
MODIFY itab INDEX sy-tabix.
press F1 on modify,you will get to know different syntax for modify.
Regards,
Aparna
‎2008 Oct 01 11:41 AM
‎2008 Oct 01 11:41 AM
‎2008 Oct 01 12:43 PM
‎2008 Oct 01 11:44 AM
If there is no data available beforehand in the itab, then we have to use append and if we want to add new column in itab then we use modify.
if already there is data in ur itab,, loop at this itab, then read the itab from which u need to get data, the use move to transfer it to ur output itab,,
and here u use modify statement.
i will like to tell you that its better to avoid joins, rather u should be using for all entries.
Sid.
‎2008 Oct 01 11:52 AM
Hi,
You can try this:
TYPES:BEGIN OF gt_cr_det,
labor LIKE mara-labor,
maktx LIKE makt-maktx,
text LIKE stzu-ztext,
END OF gt_cr_det.
data: gt_created_details TYPE gt_cr_det OCCURS 0 WITH HEADER LINE.
ive got 2 statements
SELECT mara~labor
makt~maktx
INTO TABLE
gt_table
FROM mara
INNER JOIN makt ON
maramatnr = maktmatnr
WHERE mara~matnr = <fs>-matnr.
Move:gt_table-maktx to gt_created_details-maktx.
SELECT SINGLE
ztext
INTO gv_text
FROM stzu
WHERE stlnr = <fs>-stlnr.
gt_created_details-text = gv_text.
MODIFY gt_created_details.
Hope this helps.
Thanks,
Rashmi.