on 10-09-2005 4:17 AM
Hi Friends,
Iam facing 1 problem in SAP script.I want to print Invoice number with leading zeros.In my print program the internal table is populating with leading zero,but when it comes to form it is having value without leading zero.for eg. Itab_remittance-invoice is 01000000 in print prog. when it come is to form its value is 100000.The datatype is char. of length 8. If i move the field to a temp.variable (N or I) the value is populating in print programing but it is not populating in the form. So help me to solve this problem.
Rgds,
Rama
Does it has any conversion routine associated with it? If so, remove the association, then it should work. Let us say if your Itab_remittance-invoice is defined 'LIKE VBRK-VBELN', then remove that reference and define it just as char(10).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No ya i tried this, but it is not populating the value in SAP Script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To store Remittance Advice details
DATA: BEGIN OF ITAB_REMITTANCE OCCURS 0,
INVOICE LIKE ZSAP_INVOICE-NEW_VBELN,
INVOICE_DATE LIKE ZSAP_INVOICE-INVOICE_DATE,
ACCOUNT LIKE ZSAP_INVOICE-PAYER,
NAME LIKE KNA1-NAME1,
TOT_PAST_DUE LIKE ZSAP_BALFWD-TOT_PAST_DUE,
DOC_CHARGES LIKE ZSAP_BALFWD-DOC_CHARGES,
DOC_TOTAL_DUE LIKE ZSAP_BALFWD-DOC_TOTAL_DUE,
END OF ITAB_REMITTANCE.
ZSAP_INVOICE-NEW_VBELN is of type c and length 8
DATA : V_TEMP(8) TYPE N.
LOOP AT ITAB_REMITTANCE.
WRITE ITAB_REMITTANCE-INVOICE TO V_TEMP.
ENDLOOP.
The value(1000000) is populating without leading zero in V_TEMP in print program whereas in Script it is populating as blank value.
Hi Ramadevi,
Instead of "MOVE" use "WRTIE TO" to pass data into Itab_remittance-invoice .
WRITE <INVOICE_NUM> TO Itab_remittance-invoice .
( <INVOICE_NUM> should be of type N. If your invoice number is of type NUMC then first pass it to type N field ( temporary work area ) and then use "WRITE TO" in program )
Or directly use the SAP std field for invoice number on
sapscript like &<INVOICE-NUM>(K)& . The leading 0s are deleted due to conversion defined in dictionary . With this way you can Ignore conversion routines.
Cheers.
( Don't forget to reward if answers were helpful.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.