‎2007 Jun 19 1:18 PM
Hallow
I use perform using and I wont to move into perform <b>tables</b>
I try like this but <b>t_data</b>. In subroutine is get empty
What I doing wrong?
I new in this topic
nametab_3001 is internal table
PERFORM write_server USING nametab_3001 .
FORM write_server USING p_t_data.
FIELD-SYMBOLS: <wa> TYPE ANY.
OPEN DATASET adress IN TEXT MODE
ENCODING DEFAULT FOR OUTPUT.
IF sy-subrc = 0.
no_file = ' '.
LOOP AT <b>t_data</b> ASSIGNING <wa>.
TRANSFER <wa> TO adress.
ENDLOOP.
CLOSE DATASET adress.
ELSE.
no_file = 'X'.
ENDIF.
Regards
‎2007 Jun 19 2:31 PM
HI..,
Check this code once... it is error free!!!
data:
begin of t_spfli occurs 0,
carrid type spfli-carrid,
connid type spfli-connid,
end of t_spfli.
select carrid connid from spfli into table t_spfli.
PERFORM write_server tables t_spfli.
FORM write_server tables p_t_data .
FIELD-SYMBOLS: <wa> TYPE any.
OPEN DATASET 'adress' IN TEXT MODE FOR OUTPUT ENCODING DEFAULT .
IF sy-subrc = 0.
LOOP AT p_t_data ASSIGNING <wa>. "<change here..
TRANSFER <wa> TO 'adress'.
ENDLOOP.
CLOSE DATASET 'adress'.
ELSE.
ENDIF.
endform.
reagards,
sai ramesh
‎2007 Jun 19 1:22 PM
Hi...
In form u have used different table name... check this ...
PERFORM write_server <b>TABLES</b> nametab_3001 .
FORM write_server <b>TABLES</b> p_t_data .
FIELD-SYMBOLS: <wa> TYPE ANY.
OPEN DATASET adress IN TEXT MODE
ENCODING DEFAULT FOR OUTPUT.
IF sy-subrc = 0.
no_file = ' '.
LOOP AT <b><u>p_t_data</u></b> ASSIGNING <wa>. "<change here..
TRANSFER <wa> TO adress.
ENDLOOP.
CLOSE DATASET adress.
ELSE.
no_file = 'X'.
ENDIF.
regards,
sai ramesh
Message was edited by:
Sai ramesh
‎2007 Jun 19 1:22 PM
well if you want to pass a TABLE to your Form-routine, then you gott use the TABLES staement rather than the USING statement.
‎2007 Jun 19 1:23 PM
‎2007 Jun 19 2:31 PM
HI..,
Check this code once... it is error free!!!
data:
begin of t_spfli occurs 0,
carrid type spfli-carrid,
connid type spfli-connid,
end of t_spfli.
select carrid connid from spfli into table t_spfli.
PERFORM write_server tables t_spfli.
FORM write_server tables p_t_data .
FIELD-SYMBOLS: <wa> TYPE any.
OPEN DATASET 'adress' IN TEXT MODE FOR OUTPUT ENCODING DEFAULT .
IF sy-subrc = 0.
LOOP AT p_t_data ASSIGNING <wa>. "<change here..
TRANSFER <wa> TO 'adress'.
ENDLOOP.
CLOSE DATASET 'adress'.
ELSE.
ENDIF.
endform.
reagards,
sai ramesh