‎2007 Nov 15 5:06 PM
Good day to you!
I have the following code:
CALL TRANSACTION 'FPO4' USING bdcdata
MODE 'A'.
The last line in my bdcdata is to simulate pressing the Execute button (OK_CODE = '=ONLI'). However, instead of running the report that FPO4 is supposed to generate, it just comes back to my program and its selection screen.
Please note that although I am populating data on FPO4's native Selection Screen, I am also populating data on a special "predefined selection," so using a simple SUBMIT has never been an option to me.
Does anyone know how I can get FPO4 to actually execute vs. coming back to my program?
Thanks -- as always, points for all helpful answers!
‎2007 Nov 15 5:21 PM
Before calling the call transaction, put a dummy screen of the report output
' ' 'OK_CODE' '=ONLY'.
*This screen name nad number should come in the SHDB recording..
*Don't assing any OK_CODE to that screen
Perform screen 'X' 'SAPMSSY0' '0120'. "<< it should be your reports screen
CALL TRANSACTION 'FPO4' USING bdcdata
MODE 'A'.Actually, I dont' have this transaction in my systm otherwise I should able to give you exact screen name and number.
Regards,
Naimesh Patel
‎2007 Nov 15 6:04 PM
Naimesh,
I am confused by this "dummy screen" you're talking about and how I should incorporate it into my code. Can you be a little more specific on this?
Thanks,
Dave
‎2007 Nov 15 8:11 PM
Hi Dave,
Is possible for you to paste the recording of your Tcode.. Full recording?
Starting witht the selection screen, than ONLI, than the report screen and than the back button from the report screen.
I will give you the DUMMY Screen from the recording...
Regards,
Naimesh Patel
‎2007 Nov 15 5:43 PM
after call transaction use temporarily
if sy-subrc NE 0.
message <>.
endif.
and check and analyze where its coming back.
Did u debug your code though ??
‎2007 Nov 15 6:05 PM
Hi,
Why don't you use LEAVE TO TRANSACTION... instead of call transaction...
Regards,
Dharitree
‎2007 Nov 15 6:08 PM
I didn't think I could pass data with a LEAVE TO TRANSACTION?
‎2007 Nov 15 6:09 PM
Hi Dave,
I am in version 4.7 and I don't see a transaction code FPO4. Could you check and let me know if the transaction code is correct?
‎2007 Nov 15 6:15 PM
Hi Mark,
Yeah, it's definitely FPO4. We're running SAP ECC 6.0.
Dave
‎2007 Nov 15 6:36 PM
Hi Dave,
1) Place a break point on the call transaction statement and check if the internal table bdcdata has any data (It should not be empty).
2) Enter the update clause
CALL TRANSACTION 'FPO4' USING bdcdata
MODE 'A'
<b> UPDATE 'S'.</b>
Let me know if this helps.
‎2007 Nov 15 6:43 PM
Mark,
I originally had that UPDATE clause in there, but I put it back in. I verified that the bdcdata internal table does have all of the data in it. All of the fields get updated on the screen, but when I do that final "click" of the Execute button, I come back to my calling program.
If I go to FPO4 itself and enter values, then click Execute, it runs and creates the desired report.
Dave
‎2007 Nov 15 7:00 PM
Hi Dave,
Create an internal table of type BDCMSGCOLL and use the message clause. Probably the message returned in this internal table could give us a clue.
‎2007 Nov 15 7:26 PM
Mark,
Did that, and the message table that came back was empty.
‎2012 Apr 25 4:31 AM
Hi Dave,
I am facing the same problem i.e. can't able to execute FPO4 through bdc, so could please suggest regarding it?
I have one more query ' how to fetch FPO4 data into an internal table of my program?'
Thanks,
Lava.