on 07-03-2008 12:12 PM
hai guys,
i have wirtten a subroutine to modify my po.the following is the code.
FORM sub_form2 TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
DATA : l_kntyp type konv-kntyp,
l_knumv TYPE knumv.
break damlek.
READ TABLE IN_TAB WITH KEY NAME = 'EKKO-EBELN'.
IF SY-SUBRC = 0.
L_KNUMV = IN_TAB-VALUE.
ENDIF.
SELECT single kntyp FROM konv INTO l_kntyp WHERE KNUMV = l_knumv.
BREAK damlek.
IF sy-subrc EQ 0.
READ TABLE out_tab INDEX 1.
IF sy-subrc EQ 0.
out_tab-value = l_kntyp.
IF l_kntyp = 'F'.
out_tab-name = 'FREIGHT'.
out_tab-value = 'l_kntyp'.
append out_tab.
ELSEIF l_kntyp = 'C'.
out_tab-name = 'INSURANCE'.
out_tab-value = 'l_kntyp'.
append out_tab.
ENDIF.
MODIFY out_tab INDEX 1.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. "sub_form2
in this my issue is that i am getting the value in to the variable l_knumv but i am not getting the value into l_kntyp.please sugeest me suitable solution for this.
points will b given for the solution.
it's very urgent.
Hi,
You have appended to out_tab instead of that you will have to use MODIFY statement along with key that you have provided in the script.
Regards,
Bharat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi..
chk in konV table...wheather for KNUMV = the value in l_knumv ..entry is thr or not..
if that entry is not thr...then the select query cant fetch anything.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai prasanna,
i am sorry.the coding has benn changed little bit now.
the perform in se71 is.
PERFORM SUB_FORM2 IN PROGRAM ZSSS_NEW
USING &EKKO-EBELN&
CHANGING &L_KBERT&
ENDPERFORM
FORM sub_form2 TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
TYPES : BEGIN OF ty_itab,
kschl TYPE konv-kschl,
kbetr TYPE konv-kbetr,
END OF ty_itab.
DATA : t_itab TYPE STANDARD TABLE OF ty_itab,
wa_itab TYPE ty_itab.
DATA :
l_knumv TYPE knumv,
l_ebeln TYPE ebeln.
break damlek.
READ TABLE in_tab WITH KEY name = 'EKKO-EBELN'.
IF sy-subrc = 0.
l_ebeln = in_tab-value.
ENDIF.
SELECT SINGLE knumv FROM ekko INTO l_knumv WHERE ebeln = l_ebeln.
if not l_knumv is initial.
SELECT kschl kbetr
FROM konv
INTO corresponding fields of table t_itab
where knumv = l_knumv.
endif.
break damlek.
if sy-subrc = 0.
loop at t_itab into wa_itab.
READ TABLE out_tab with key = 'KONV-KNUMV'.
out_tab-value = wa_itab-kbetr.
modify out_tab.
endif.
now here upto itab i am gettinfg the value of kbert,but i want to populate it into out_tab so that i can print it in po.
plz give me the solution.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.