on 03-18-2010 11:16 AM
not being an ABAPer i have the task of changing the Invoice SAPScript form.
i have made the necessary changes - just about... but they have asked that i include the VAT Number on the Invoice....
not too bad apart from different company codes have different vat numbers...
not knowing a better way to retrieve data from table V_001_B - i am using the print program -RFKORD50, is there a better way of getting the VAT Number by company code? I figured if i could call the FM to return the value, all well and good.., they do not want the print program changed if possible so was looking at alternate methods....
or am i trying to reinvent the wheel here?
thank you both! helpful answers! 🐵
anyway!
i have written the program which is called from the SAPScript:
/: PERFORM GET_VATNUMBER IN PROGRAM ZFI_F140_OPERATIONS
/: USING &BKPF-BUKRS&
/: CHANGING &VATNUMBER&
CE VAT Registration No : &VATNUMBER&
REPORT zfi_f140_operations.
FORM get_vatnumber TABLES in_par STRUCTURE itcsy
out_par STRUCTURE itcsy.
DATA: lv_co_code TYPE bukrs,
lv_vat_no TYPE stceg.
READ TABLE in_par WITH KEY name = 'BKPF-BUKRS'.
MOVE in_par-value TO lv_co_code.
SELECT SINGLE stceg FROM t001
INTO lv_vat_no WHERE bukrs = lv_co_code.
out_par-name = 'VATNUMBER'.
WRITE lv_vat_no TO out_par-value.
CONDENSE out_par-value.
MODIFY out_par INDEX 1.
ENDFORM.
it is not working and i cannot work out why...
i have not been ABAPing for very long but have had a go....
any thoughts as to what i have done wrong?
or point me where i should be looking? thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can create a subroutine pool and call a subroutine from a sap script.
Without modifying the print program this is the only way to call a fm from sap script.
But as you said you are not allowed to modify the print program, so there wont be any option provided to create a new program too i guess
Please search for 'sapscript subroutines' for more details
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
You can use a subroutine in the script and call the function module in a subroutine pool program instead of modifying the driver program.
Check the link to call subroutines in sap script
http://help.sap.com/saphelp_NW70EHP1/helpdata/en/d1/803279454211d189710000e8322d00/content.htm
Thanks & Regards
Sarves S
Edited by: Sarves Sombhatla on Mar 18, 2010 7:42 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.