Application Development and Automation 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: 
Read only

Call Screen in background

Former Member
0 Likes
5,125

Hi Folks,

I am struck in to get the solution. I am trying to call a Function Module '/ORS/000007_CALL_APPR_SCREEN' . This Function Module call a screen, which has some button ( such as Approve , Reject).

Here is my requirement is, I need to create a wrapper function module which will call this Funciton Module '/ORS/000007_CALL_APPR_SCREEN'' in background and in the background I want to press the Approve / Reject Button. Is it possile or not?

Hope you guys understood ,my challenge. If I call a Function module in foreground I will get a screen and can press Approve / Reject button but in the background the Call screen is not working.

I would highly appreciate if you could give me some input / solution on this.

Thanks,

Parag.P

1 ACCEPTED SOLUTION
Read only

deepan_v_s
Active Participant
0 Likes
3,327

Hi Parag,

It is not possible to call a screen in Background, and approval / Rejection cannot be done as per your req.

The reason why it's not possible is, while calling the screen in Background, screen will not be visible and how will you approve / reject if nothing is visible to you ??

But the best way to achieve is to use a BDC and write condition for Approve/ Reject while calling the BDC.

Regards,

Deepan Swaminathan.

Hi Folks,

I am struck in to get the solution. I am trying to call a Function Module '/ORS/000007_CALL_APPR_SCREEN' . This Function Module call a screen, which has some button ( such as Approve , Reject).

Here is my requirement is, I need to create a wrapper function module which will call this Funciton Module '/ORS/000007_CALL_APPR_SCREEN'' in background and in the background I want to press the Approve / Reject Button. Is it possile or not?

Hope you guys understood ,my challenge. If I call a Function module in foreground I will get a screen and can press Approve / Reject button but in the background the Call screen is not working.

I would highly appreciate if you could give me some input / solution on this.

Thanks,

Parag.P

9 REPLIES 9
Read only

deepan_v_s
Active Participant
0 Likes
3,328

Hi Parag,

It is not possible to call a screen in Background, and approval / Rejection cannot be done as per your req.

The reason why it's not possible is, while calling the screen in Background, screen will not be visible and how will you approve / reject if nothing is visible to you ??

But the best way to achieve is to use a BDC and write condition for Approve/ Reject while calling the BDC.

Regards,

Deepan Swaminathan.

Read only

0 Likes
3,327

Hi,

I have just a suggestion, why you don't try to create a program and a transaction code,

for this program, you need a transacion and inside this program , you call this FM.

So next step.,

of course you know this transaction code  SHDB  which you can record the process.

it means you can call it background and it should do your requirement,

Regards

Ibrahim

Read only

0 Likes
3,327

Hi Ibrahim-

Thanks and appreciate your help to provide the solution.

Now in the recording I am struck to record the TEXTEDITOR. We are struggeling with TEXTEDITOR BDC recording on the screen. Is there anyway I can record the Texteditor in BDC Recording. without capturing the text in the text editor we cannot save the doc, cause it is mandatory.


So we need a way to record / populate the text in the text editor before saving the document.

Hope you guys are clear. I know SAVE_TEXT Function module but cannot work because we cannot save the text before

Thanks in Advance

Read only

former_member246634
Active Participant
0 Likes
3,327

Is it possible for you to just pass sy-ucomm (or any other parameter with given command)?

IF.... .

     sy-ucomm = 'APPROVE'.

ELSE.

     sy-ucomm = 'REJECT'.

ENDIF.

Or maybe extract needed code from '/ORS/000007_CALL_APPR_SCREEN' after pressing necessary button.

You can also look at this: SAP BDC Recording

Greetings,

Bartłomiej

Read only

ipravir
Active Contributor
0 Likes
3,327

Hi Parag,

BDC executes either in Background or foreground. you cannot mix the both in one procedure.

Yes for your situation, you can put a condition at the start of the process and based on condition you can set the SCREEN next process, like APPROVE or REJECT.

Regards,

Praveer.

Read only

Former Member
0 Likes
3,327

Hi,

I don't understand any of this.

  • Why are you trying to call a screen in the background to approve/reject something?
  • Your requirement isn't to call this FM in background - that appears to be your chosen solution.  There is a significant difference between requirement and solution.
  • You need to explain why you want to do this based on what the actual requirement is, as I strongly suspect you will find a much better solution to your requirement that doesn't involve trying to do something that makes no sense.
  • Call screens simply cannot work in the background, for hopefully obvious reasons hence why things like BDC and BAPI's have been created over the years.

Please think about what you are actually trying to achieve, rather than how to achieve it, before going any further.

Cheers,

Gareth.

Read only

0 Likes
3,327

Hi Gareth and All Techies-

Here is the Actual requirement,

OpenText has a VIM Workflow, Workitem is assigned to approver to Approve or Reject. But the workitem is not an User decision, It is an activity, this activity calls a screen in foreground which has buttons Approve and Reject.

Till now everything is configured and working.

Here is the Challenge, We need to integrate this workitem with SAP Fiori, and Fiori can get the workitem but FIORI cannot execute the buttons which are there in the SAP Screen, Because Mobile device needs to have a VPN to connect with SAP.

So what I am proposing the solution:

We will create a Wrapper RFC and in the RFC we will record the BDC, Till now I could able to trigger the button  from RFC, as proposed by "Ibrahim Hatem". this is now working fine, I am now able to click the buttons but now We are struggeling with TEXTEDITOR BDC recording on the screen.

We are not able to record the TEXTEDITOR in BDC Recording. Is there anyway I can record the Texteditor in BDC Recording.

I would really appreciate if you could help us to provide any other soluiton.

Thanks in Advance

Read only

0 Likes
3,327

Hi,

If the "TEXTEDITOR" is implemented using SAP GUI Control, you are out of luck: see 311440 - Batch input and controls.

I have no idea how OpenText has designed and built their solution, but IMO you are trying to wrap and expose functionality from the wrong "software layer". Don't try to do it - if there is no UI independent public OpenText API for the business functionality you require (if there is no suitable API), explain that to the customer. Let the customer talk to OpenText, explain the need - ask for API.

It's not the most important (or should not be the most important) to the customer whether you can quickly hack together something that can work under Fiori now - it's whether that "something" will still be working after the next service pack, next upgrade, in 5 and then 10 years time... and what will it cost to keep it running. Don't try to expose as service something that sounds like some "random" function module, having "screen logic" in it!

cheers

Jānis

Read only

b1jdm
Explorer
0 Likes
3,327

I know this is an old thread, but many modern SAP screens rely on SAPGui components to render. If you run in background/ batch those components are not available/visible to the process. As stated by others, it won't work.

One possibility is to use the screen recorder and simulate background/batch. If an alternate screen is available which not tied to the SAPGui components you may find success, otherwise, you would need to find the routine / function modules which perform the updates (in the PAI of the screen ) and create a 'wrapper' program to execute the function directly. This can be challenging to a newbie.