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: 

BADI: Screen selection

Former Member
0 Kudos

Hi

I want to call a program and fill the selection screen of that program. How/where in the badi do i do this.

Do i need to create it in the method?

Message was edited by: Giovanni Baumann

11 REPLIES 11

Former Member
0 Kudos

If you want to call a report, you can do that using

SUBMIT REPORT report_name

WITH PARAMETER1 = 'XXX' ....

However, I am not sure if you want to do that from BADI as usually BADI's are part of the standard transaction.

What exactly are you trying to do?

Regards,

Ravi

Former Member
0 Kudos

U need to use the SUBMIT (Report) command to call a report and fill its selection screen elements.

Refer SAP help for further documentation

-Kiran

Former Member
0 Kudos

Hi,

Can you specify the requirement in a clear fashion..?Because you don't need a Badi to do that .

You can use SUBMIT statement to do that.

Just go through this link....

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/content.htm

It seems you have not put this post as a question now... Put it in the question(by checking the checkbox in the edit mode) and close the thread once it is solved.

Regards,

SP.

Former Member
0 Kudos

I want to call report RCCLORD with the screen selecion populated as soon as i save the process order (transaction code COR2).

0 Kudos

I am not sure by calling the SUBMIT statement your goal will be achieved as the BADI will call the report within the transaction itself.

You can try using the SUBMIT REPORT ANYWAYS.

SUBMIT... [VIA SELECTION-SCREEN]

[USING SELECTION-SET <var>]

[WITH <sel> <criterion>]

[WITH FREE SELECTIONS <freesel>]

[WITH SELECTION-TABLE <rspar>].

Regards,

Ravi

Note : Please mark all the helpful answers

0 Kudos

How will i get selection screen table populated before i submit it to the reportname?

Former Member
0 Kudos

You have to implement an instance in transaction SE19 for the BADI WORKORDER_UPDATE, Use the method IN_UPDATE where you can call your program using SUBMIT, but remember to use the clause... AND RETURN.

Anyway this is not highly recommended because transaction COR2 it´s still running.

Regards.

JMA.

Message was edited by: Jose Maria Alot Aguilar

0 Kudos

Jose

Why don't you recommend it and what other way would you do it?

0 Kudos

I don´t recommend this because as it says in the Method documentation:

Notes

Note that the method is carried out in the update process. In particular, no dialog is possible, no messages may be sent and no database commit may be executed because otherwise an orderly rollback is no longer possible.

So, i think you can collect all the orders and then create idocs via report RCCLORD in another step (for example in a separate Job after an event that you can activate in the BADI).

0 Kudos

Jose

How can i collect all the orders?

If i execute RCCLORD it downloads all process orders every time. How can i ensure that this will program only exports process orders that has been created/changed?

Message was edited by: Giovanni Baumann

0 Kudos

Have you thought looking at workflow?

There should be a business object for the process order. Now you need to define a workflow on create and on change event.

You may call a background method and make it accessible to all users. In the the method call your report.

Enjoy

Message was edited by: F.J. Brandelik

Another way would be to make sure that the process order participates in the change document process. You could then go and collect all changed documents of that type in a specific time period and run the report for those process orders only.