‎2008 May 26 12:24 PM
Hi all,
Is correct pgm below plz see it..
Data: BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE zst1.
data: end of itab.
PAI:
IF SY-UCOMM = 'SUBMIT'.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING ZST1 TO ITAB.
Insert zst1 from itab---->its correct pgm. can display to db table.
Insert zst1 from table itab.----> its cannot displayt to db table? how??
MESSAGE I000(ZS1).
ENDIF.
ENDIF.
Reply me immediately,
S.Suresh.
‎2008 May 26 12:27 PM
hi,
using
MOVE-CORRESPONDING ZST1 TO ITAB.
you are moving values to header line not to internal table.
you must use append also with it.
so u cannot use
Insert zst1 from table itab.
but u can use Insert zst1 from itab
as itab is header line and has values
You can code in 2 ways
Data: BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE zst1.
data: end of itab.
PAI:
IF SY-UCOMM = 'SUBMIT'.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING ZST1 TO ITAB.
append itab.
Insert zst1 from table itab.
MESSAGE I000(ZS1).
ENDIF.
ENDIF.
(or)
Data: BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE zst1.
data: end of itab.
PAI:
IF SY-UCOMM = 'SUBMIT'.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING ZST1 TO ITAB.
Insert zst1 from itab.
MESSAGE I000(ZS1).
ENDIF.
ENDIF.
reward if helpful
mahesh
‎2008 May 26 12:27 PM
hi,
using
MOVE-CORRESPONDING ZST1 TO ITAB.
you are moving values to header line not to internal table.
you must use append also with it.
so u cannot use
Insert zst1 from table itab.
but u can use Insert zst1 from itab
as itab is header line and has values
You can code in 2 ways
Data: BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE zst1.
data: end of itab.
PAI:
IF SY-UCOMM = 'SUBMIT'.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING ZST1 TO ITAB.
append itab.
Insert zst1 from table itab.
MESSAGE I000(ZS1).
ENDIF.
ENDIF.
(or)
Data: BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE zst1.
data: end of itab.
PAI:
IF SY-UCOMM = 'SUBMIT'.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING ZST1 TO ITAB.
Insert zst1 from itab.
MESSAGE I000(ZS1).
ENDIF.
ENDIF.
reward if helpful
mahesh
‎2008 May 26 12:28 PM
Hi,
Data: BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE zst1.
data: end of itab.
PAI:
IF SY-UCOMM = 'SUBMIT'.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING ZST1 TO ITAB.
you need to append to the itab table because move only moves to the work area itab and does not append . write this line after move
Append itab
Insert zst1 from itab---->its correct pgm. can display to db table. This is work area
Insert zst1 from table itab.----> its cannot displayt to db table? how??
MESSAGE I000(ZS1).
ENDIF.
ENDIF.
regards,
Advait
‎2008 May 26 12:29 PM
Hi,
caseSY-UCOMM
when 'SUBMIT'.
MOVE-CORRESPONDING ZST1 TO ITAB.
Insert zst1 from itab---->its correct pgm. can display to db table.
endcase.
MESSAGE I000(ZS1).
Regards,
Raghu