cancel
Showing results for 
Search instead for 
Did you mean: 

problem with form routine

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

former_member673464
Active Contributor
0 Kudos

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

Former Member
0 Kudos

HI,

Check wether values are getting passed to the FM.