Application Development 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: 

LOGIC TO remove wrong hard coding in SAP SCRIPT.

Former Member
0 Kudos

In my below script editor coding the "Payment Due Immediately" is hard coded.

/: SET DATE MASK = "MM/DD/YYYY"

/* -- Invoice Information

/: IF &BSEG-BSCHL& EQ '01'.

DN <B>DEBIT MEMO NO. &BKPF-BELNR& </>

SP

IN ISSUE DATE: &BKPF-BLDAT&

/

/

/

IN <B>TERMS: Payment Due Immediately </>

/: ENDIF.

Now I need build logic to use T052u table or TVZBT to bring text (TEXT1 field) for zterm instead of hard coding which is wrong.

Please correct me if I am wrong --> I need to write the logic in subroutine pool program to bring TEXT1 field from T052u or TVZBT table say PERFORM GET_TVZBT_TEXT1 IN PROGRAM Z_F_P_LAYOUT_TEXT USING ??? (here what to use).

My problem is

What to write in SCRIPT editor and

*WHAT TO WRITE IN PROGRAM Z_F_P_LAYOUT_TEXT .

What I can use in where condition while selecting TEXT1 field from T052u or TVZBT table

THANKS IN ADVANCE.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sam Kumar,

Firstly to get the Text from the table T052U or TVZBT you need to have field.

ZTERM --->Terms of Payment Key

As you have BELNR field, you need to get teh ZTERM field from table BSEG ---> Accounting Document Segment. and then you need to fetch the text from the table T052U or TVZBT.

Best regards,

raam

1 REPLY 1

Former Member
0 Kudos

Hi Sam Kumar,

Firstly to get the Text from the table T052U or TVZBT you need to have field.

ZTERM --->Terms of Payment Key

As you have BELNR field, you need to get teh ZTERM field from table BSEG ---> Accounting Document Segment. and then you need to fetch the text from the table T052U or TVZBT.

Best regards,

raam