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: 

Use SUBMIT program is ADOBE FORM ENTRY routine

former_member213851
Active Contributor
0 Kudos

Hi All,

I searched most of the treads on SCN but couldn't find solution.

I want to use SUBMIT program in Driver program which is use to trigger form.

But on PRINT Command, it gives "POSTING_ILLEGAL_STATEMENT" - SUBMIT and RETURN not allowed in this form

I tried by calling SUBMIT program is UPDATE FM as suggested in one of the thread on SCN but still dump is coming.

Is there any way by which we can use SUBMIT Program in Forms.

Thanks and Regards,

Sachin Adak

1 ACCEPTED SOLUTION

Former Member

Hi

I don't think the problem is for the SUBMIT , how do you call your report and how do you run your adobe?

Max

19 REPLIES 19

Former Member

Hi

I don't think the problem is for the SUBMIT , how do you call your report and how do you run your adobe?

Max

0 Kudos

Hi Max,

I am calling driver program using Output type configured in NAST and in that driver program I am using SUBMIT program.

Regards,

Sachin Adak

0 Kudos

Hi

I've inserted a submit in the interface of adobe and there's no problem, so you should post your code where you do the submit

Max

0 Kudos

Hi Max,

I am putting submit stmt in the ENTRY routine of form and it gives issue when I click on Print Icon after selecting desired output type ( send Immediately ) mode.

Regards,

Sachin

0 Kudos

HI Max,

I tried using submit in INITIALIZATION of interface but it gave me dump.

Can you tell me what exactly you did in the Interface.

Regards,

Sachin

0 Kudos

Hi Sachin,

SUBMIT always issue a COMMIT work and the print programs are called mainly in UPDATE TASK so you will get the dump as COMMIT is not allowed in V1/V2 update processes.

What you can do if it can be asynchronous, you call a wrapper FM in BACKGROUND TASK and inside that FM do the SUBMIT. It worked for me.

R

0 Kudos

HI Rudra,

Thanks for prompt reply.

Did you use RFC enabled FM for this

Regards,

Sachin

0 Kudos

Yes .. In Order to call IN BACKGROUND TASK the FM has to be RFC enabled.

0 Kudos

http://help.sap.com/saphelp_45b/helpdata/en/34/8e73b36df74873e10000009b38f9b8/content.htm
In the SAP documentation its been mentioned that  'SUBMIT ' cannot be used in RFC FM.

0 Kudos

Well done Sachin. Your are right. But this link talks about true RFC which are called from outside world which in turns issue a COMMIT when the RFC connection closes and do not expect a COMMIT in between .

Unfortunately in order to use BACKGROUND task you have to set the Processing type for the FM as Remote enabled. So this custom  FM will work for you but maynot be used to be called from outside world.

Hope it makes sense now.

0 Kudos

Hi Rudra,

According to me, SAP system will not make any difference between RFC called from same or different system as it would simply check RFC and SUBMIT combination and throw an error.

Please correct me if I am wrong.

Also I tried using RFC FM in background mode (this wrapper FM is released )and has Destination as 'NONE' but it gave me Dump 'DIAG_RFC_EXCEPTION' - Error in RFC communication with SAP GUI.

Am I missing anything...

Regards,

Sachin

0 Kudos

What code you have put inside the FM? Can you share that? Is your program that is being submitted throwing any screen? Could you use also use AS SEPARATE UNIT addition?

Or else go for CALL FUNCTION - IN BACKGROUND UNIT It is a newer statement and uses bgRFC instead of tRFC.

0 Kudos

Inside the FM I am calling standard report RCS13001 (CS13 TCODE ) and collecting it's output in internal table using EXPORT - IMPORT statement.

I guess there is some issue with RFC destination..

Regards,

Sachin Adak

0 Kudos

It cannot be problem with RFC destination as you are not calling the FM remotely.

When you run the Program RCS13001 manually. Do you get any pop up or is there any interaction.


I cannot run that program in my system.


Also if you want to explode BOM did you explore other standard FMs?

0 Kudos

I tried with different FMs but none of them was full proof and can not give same results as that of CS13.

There is no pop up and I have used same SUBMIT  in REPORTs successfully but for FORMs it's NAST_PROTOCOL_UPDATE causing the issue.

Also I am getting dump due to RSTPDAMAIN Termination.

0 Kudos

Not sure how you have developed the code inside FM. and not sure if I understood your requirement correctly.

Remember when you use background task it is an asynchronous processing and you should not expect to get any data back.

0 Kudos

There is only one submit and one IMPORT statement in code and nothing else.

0 Kudos

what are doing using the IMPORT? Getting some data back? the program you mentioned seemed a report to me which generates some output. If you want to use it in your Print program then this is not the right way. Either you go for some standard FM to fetch the data inside the Driver program or write your own logic to get the data.

0 Kudos

Dear Rudra,

I am exporting the output of CS13 in to ABAP memory when it's being called from my Form based on conditions . I did enhancement in CS13 such that after being called from form , CS13 ALV output won't be shown but it will be to export the output to memory.

So after SUBMIT, control should returns back to Custom RFC FN called in background and import the output from memory id  for further processing.

Regards,

Sachin