on 05-13-2008 12:33 PM
Hi Experts,
i added one field to from, i written one subroutine pool program for that field .but in that program w_egbel value are not getting. The first select statement is not working .if it all i changed the data at runtime iam getting the output. please tell me the mistake.
PROGRAM ZAN_GOODS_RECEIPT.
*----
TABLES DECLARATION.
tables : likp,lips,ekko,ekpo,wezlk.
*----
FORM STRUCTURE DECLARATION.
form f_head tables in_tab structure itcsy
out_tab structure itcsy.
data: w_vbeln(10) type c,
w_vgbel(10) type c,
w_ekgrp(3) type c.
loop at in_tab.
case in_tab-name.
when 'LIPS-VBELN'.
When 'WEZLK-VBELN'.
move in_tab-value to w_vbeln.
endcase.
endloop.
select vbeln
vgbel
from lips
into w_vgbel
where vbeln = w_vbeln.
endselect.
select single ekgrp
from ekko
into w_ekgrp
where ebeln = w_vgbel.
if sy-subrc ne 0.
endif.
loop at out_tab.
case out_tab-name.
when 'W_EKGRP'.
move w_ekgrp to out_tab-value.
modify out_tab.
endcase.
endloop.
endform.
perfrom is as follows.
DEFINE &W_EKGRP& = ' '.
PERFORM F_HEAD IN PROGRAM ZAN_GOODS_RECEIPT
USING &WEZLK-VBELN&
CHANGING &W_EKGRP&
ENDPERFORM.
STORER &W_EKGRP
rewards are helpful answers.
thanks ,
Narasimha Rao,
Hi,
instead of this
w_vgbel(10) type c.
write as follows
w_vgbel(10) type n.
Thanks,
NN.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
1.U r selecting two fields and placing only in one field.
So it is not coming.
change it:
select vgbelfrom lips
into w_vgbel
where vbeln = w_vbeln.
endselect.
regards,
Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.