on 01-05-2009 6:50 AM
Hi
Is there any wrong with my code .
FORM get_netpr TABLES in_par STRUCTURE itcsy out_par STRUCTURE itcsy.
DATA: VEBELP TYPE EKPO-EBELP, "item NO
VEBELN TYPE EKPO-EBELN, "doc no
VNETPR TYPE EKPO-NETPR.
READ table in_par INDEX 1.
VEBELN = in_par-value.
READ table in_par INDEX 2.
VEBELP = in_par-value
SELECT SINGLE NETPR FROM EKPO INTO VNETPR
WHERE EBELN = VEBELN and EBELP = VEBELP.
out_par-value = VNETPR.
out_par-name = 'NETPR'.
MODIFY out_par INDEX 1.
ENDFORM.
the problem is the NETPR is not passing any data where i have checked the table with above condition is fine.
what could be the problem
regards
sateesh
Hi sateesh,
As netpr is CURR field. First move it to a variable of type char.
data var1(15) type c.
then,
SELECT SINGLE NETPR FROM EKPO INTO var1
WHERE EBELN = VEBELN and EBELP = VEBELP.
out_par-value = var1.
out_par-name = 'NETPR'.
MODIFY out_par INDEX 1.
try this,
Regards,
Mr.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sateesh,
Try in this way...
read table tbl_input with key 'SCRIPT_VBELN'.
check sy-subrc = 0.
VEBELN = in_par-value.
read table tbl_input with key 'SCRIPT_VBELP'.
check sy-subrc = 0.
VEBELP = in_par-value.
loop at out_par .
case tbl_output-name.
when 'NETPR'.
tbl_output-value = VNETPR.
modify tbl_output.
endcase.
endloop.
Regards,
sg.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
I think you have to write conversion exit for vbeln before writing the select query.Refer to the following function modules.
CONVERSION_EXIT_ALPHA_INPUT
CONVERSION_EXIT_ALPHA_OUTPUT
regards,
Veeresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Check wether values are getting passed to the FM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.