‎2008 Jul 04 1:04 PM
&----
*& Form SUB_FORM2
&----
text
----
-->TAB_IN text
-->TAB_OUT text
----
FORM sub_form2 TABLES tab_in STRUCTURE itcsy
tab_out STRUCTURE itcsy.
TABLES : ekko.
DATA : w_ebeln LIKE ekko-ebeln,
w_knumv LIKE konv-knumv,
w_kschl LIKE konv-kschl,
w_kbetr LIKE konv-kbetr.
break damlek.
PERFORM get_value TABLES tab_in USING 'W_EBELN' w_ebeln.
READ TABLE tab_in WITH KEY name = 'EKKO-EBELN'.
IF sy-subrc = 0.
w_ebeln = tab_in-value.
ENDIF.
SELECT SINGLE knumv INTO w_knumv FROM konv WHERE ebeln = w_ebeln.
SELECT SINGLE knumv FROM ekko INTO w_knumv WHERE ebeln = w_ebeln.
IF sy-subrc = 0.
SELECT SINGLE kschl
kbetr
FROM konv INTO (w_kschl ,w_kbetr )
WHERE knumv = w_knumv.
CLEAR tab_out.
tab_out-name = 'W_KSCHL'.
tab_out-value = w_kschl.
APPEND tab_out.
CLEAR tab_out.
tab_out-name = 'W_KBETR'.
tab_out-value = w_kbetr.
APPEND tab_out.
CLEAR tab_out.
break damlek.
ENDIF.
ENDFORM.
and in the script(main window).
the code is
IF &KONV-KSCHL& = 'FRHI' OR 'INSU'
DEFINE &W_KBETR& = 'KONV-KBETR'
PERFORM SUB_FORM2 IN PROGRAM ZSSS_NEW2
USING &EKKO-EBELN&
USING &KONV-KNUMV&
CHANGING &W_KSCHL&
CHANGING &W_KBETR&
ENDPERFORM
&W_KSCHL&
,,,,,,,,,,,,,,,&W_KBETR&
so here the problem is i am not getting the value of w_kbetr into out_tab-value but i am getting the value of w_kschl into out_tab-value.so there might be problem of data type in out_tab-value(type c) and the data type of w_kbetr is curr.
please suggest sny solution if there is any function module to change the date type to curr or char.
‎2008 Jul 04 1:33 PM
HI Mahesh,
try this
write w_kbetr to out_tab-value.
this should help you
regards
padma
‎2008 Jul 04 1:33 PM
HI Mahesh,
try this
write w_kbetr to out_tab-value.
this should help you
regards
padma