[SOLVED] SAP/R3 ERROR EXECUTING ABAP4 PROGRAM : T_BACKORDER_BY_ID_PLANT
Hi!
Need help in this issue:
We have a table ZAPPTHDR that needs to be joined to a Function Modul(SAP)- Z_APPT_BACKORDER_BY_ID_PLANT which has input parameters:IN_APPT_ID and IN_PLANT.
Here is a code we use and after many tries keep getting the error "(SAP/R3 ERROR EXECUTING ABAP4 PROGRAM : T_BACKORDER_BY_ID_PLANT"
TABLE FILE ZAPPTHDR PRINT APPT_STAT APPT_ID PLANT WHERE PLANT IS 'B03' WHERE APPT_ID IS '0000079272' WHERE APPT_STAT IN ('PENDING'); WHERE DROPPED_STATUS IS ('ARRIVED'); ON TABLE HOLD AS ZAPPTHDR1 END -* JOIN APPT_ID AND PLANT IN ZAPPTHDR1 TO IN_APPT_ID AND IN_PLANT IN Z_APPT_BACKORDER_BY_ID_PLANT AS J1 END -* TABLE FILE ZAPPTHDR1 PRINT IN_APPT_ID IN_PLANT BACK_ORD_AMT END -* Result of ZAPPTHDR1 is one record,
by joing it to Function Modul we should get another column BACK_ORD_AMT.This message has been edited. Last edited by: Kerry,
Valeriya
WebFOCUS 764 Servlet - MRE/Dashboard/Self Service/ReportCaster - Windows 2000
March 22, 2010, 06:26 PM
Waz
Are you able to TABLE out of the Function Module ?
If so, then TABLE and HOLD it first.
Some data sources do not like being joined to. I am not sure about SAP function Modules.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
March 22, 2010, 06:28 PM
Dan Satchell
If you click on the Advanced Search link at the top of the forum page and search for "SAP/R3 ERROR EXECUTING ABAP4 PROGRAM" you will find a number of entries, one of which might solve your problem.
WebFOCUS 7.7.05
March 23, 2010, 04:35 AM
GamP
My two cents: It might also be that multifield join is actually not supported when joining from fix file to sap file. Try to do a join on one field and have a where on the other field in your table body. Example:
JOIN APPT_ID IN ZAPPTHDR1 TO IN_APPT_ID IN Z_APPT_BACKORDER_BY_ID_PLANT AS J1
-*
TABLE FILE ZAPPTHDR1
PRINT IN_APPT_ID
IN_PLANT
BACK_ORD_AMT
WHERE PLANT EQ IN_PLANT;
END
See if it works ...
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 24, 2010, 11:34 AM
vkrugman
Thank you to all of you~ I understand the problem was in FM : FUNCTION Z_APPT_BACKORDER_BY_ID_PLANT . *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IN_APPT_ID) LIKE ZBAPI_APPTHDR-APPT_ID *" VALUE(IN_PLANT) LIKE ZBAPI_APPTHDR-PLANT *" EXPORTING *" VALUE(OUT_APPT_ID) LIKE ZBAPI_APPTHDR-APPT_ID *" VALUE(OUT_PLANT) LIKE ZBAPI_APPTHDR-PLANT *" VALUE(BACK_ORD_AMT) LIKE ZBAPI_APPTHDR-BO_AMT *" TABLES *" OUT_RETURN STRUCTURE BAPIRET2 *"----------------------------------------------
Everywhere you see 'LIKE' it was 'TYPE'. So now Type has been replaced with 'Like' and joint is working. Im so far from that issue to understand, but those who creates SAP Funcion Mod they found this and changed that. Thank you Lera
Valeriya
WebFOCUS 764 Servlet - MRE/Dashboard/Self Service/ReportCaster - Windows 2000