on 05-13-2008 2:30 PM
hi ecperts,
i am addiing one field to the form but iam not getting the value into
w_egbel . pleae tell me the error why it is not getting the value.
rewards are helpful answers.
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 'WEZLK-VBELN'.
move in_tab-value to w_vbeln.
endcase.
endloop.
select 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.
Perfom as follows.
DEFINE &W_EKGRP& = ' '.
PERFORM F_HEAD IN PROGRAM ZAN_GOODS_RECEIPT
USING &WEZLK-VBELN&
CHANGING &W_EKGRP&
ENDPERFORM.
STORER &W_EKGRP
thanks®ards,
Narasimha.
Hi,
You declared w_vgbel as type char of 10.
for this you need to use single keyword in your select query.
or
change the declaration pf w_vgbel into internal table.
do like this.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = w_vbeln
importing
output = w_vbeln.
select single vgbel
from lips
into w_vgbel
where vbeln = w_vbeln.
Regards
Sandeep Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
do this way ..
loop at in_tab.
case in_tab-name.
When 'WEZLK-VBELN'.
move in_tab-value to w_vbeln.
endcase.
endloop.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = w_vbeln
IMPORTING
OUTPUT = w_vbeln.
select 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.