Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

modify

Former Member
0 Likes
792

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

8 REPLIES 8
Read only

Former Member
0 Likes
754

hi,

use modify gt_created_details transporting text.

Rgds.,

subash

Read only

Former Member
0 Likes
754

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

Read only

Former Member
0 Likes
754

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

Read only

Former Member
0 Likes
754

Thanks for your time..ive solved it myself.

Read only

Former Member
0 Likes
754

thanks for your time..ive solved it myself..

regs

Read only

0 Likes
754

In that case , kindly close this thread.

regards,

Advait

Read only

Former Member
0 Likes
754

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.

Read only

Former Member
0 Likes
754

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.