Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem with modifying standard sap script

Former Member
0 Likes
567

hi all,

CAN ANYONE help me on this issue i have modified my sap script form and added a field to it bur the value is not diaplaying, here is my subroutine pool program, name of program is zmm_rpt_challan and routine name is rate.i have define it as follows can anyboby please let me know the problem in this.

FORM RATE TABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy.

TABLES:J_1IEXCDTL.

DATA : V_INTNO(15) TYPE C.

DATA : RATE TYPE J_1IEXCDTL-EXBAS.

DATA : V_EXBAS TYPE J_1IEXCDTL-EXBAS.

READ TABLE in_tab WITH KEY name = 'J_1IEXCDTL-EXNUM'.

CHECK sy-subrc = 0.

V_INTNO = in_tab-value.

SELECT SINGLE SUM( EXBAS ) AS EXBAS FROM J_1IEXCDTL INTO V_EXBAS WHERE EXNUM = V_INTNO.

IF V_EXBAS IS NOT INITIAL.

V_EXBAS = V_EXBAS * '0.1648'.

READ TABLE out_tab WITH KEY name = ' V_EXBAS'.

out_tab-value = V_EXBAS.

MODIFY out_tab INDEX sy-tabix.

ENDIF.

my form definition i have define is:-

/E: REVERSAL_AMOUNT

/: PERFROM RATE IN PROGRAM ZMM_RPT_CHALLAN

/: USING &J_1IEXCDTL-EXBAS&

/: CHANGING &V_EXBAS&

I3 TOTAL REVERSAL AMOUNT IS: &V_EXBAS&

5 REPLIES 5
Read only

Former Member
0 Likes
548

Hi Abinash,

You need to pass the value of V_EXBAS from the driver program to SAP SCript.

In the WRITE_FORM, add parameter V_EXBAS.

Best regards,

Prashant

Read only

0 Likes
548

I AM USING STANDARD DRIVER PROGRAM AND USING SUBROUTINE TO CALL IN FORM DIRECTLY WIDOUT CHANGING MY DRIVER PROGRAM.

Read only

Former Member
0 Likes
548

This may be a spacing issue.

The ITCSY structure has a field value which is 255 characters long. When you place a numeric value in this field, by default it is placed right justified (ie has 200+ leading spaces).

When you include this in your script you only see the leading spaces unless your field is on a very long line, and the field may be truncated to a shorter length when moved into the target field.

In the ABAP form, try replacing out_tab-value = V_EXBAS. with:

out_tab-value+0(20) = V_EXBAS.

or

write V_EXBAS to out_tab-value left-justified.

Andrew

Read only

0 Likes
548

HI ,

i have solved it anyway there was problem with the select query.

thanks all.

Read only

Former Member
0 Likes
548

soled