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

have to pass value with push button

Former Member
0 Likes
2,066

Hi All,

Please help on this, i have enhancement like need to place a push button on a subscreen.if i click that button, it will goes to another customer enhanced screen where it displays a table control.I have to pass a value when i click the push button, using that value table control will generate table. how to do this one....

Avinash

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,838

I'm not exactly sure about your requirment, but if you can't pass the value directly, then you can EXPORT it to a MEMORY ID when user clicks the pushbutton, then IMPORT it from MEMORY ID before you build the table control.

Regards,

Rich Heilman

Hi All,

Please help on this, i have enhancement like need to place a push button on a subscreen.if i click that button, it will goes to another customer enhanced screen where it displays a table control.I have to pass a value when i click the push button, using that value table control will generate table. how to do this one....

Avinash

12 REPLIES 12
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,839

I'm not exactly sure about your requirment, but if you can't pass the value directly, then you can EXPORT it to a MEMORY ID when user clicks the pushbutton, then IMPORT it from MEMORY ID before you build the table control.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,838

Iam calling the enhanced sceen from me41.where i put a push button at item level and used call transaction.i need to pass the RFQ number to enhanced screen.

Avinash

Read only

0 Likes
1,838

Avinash - Do the users enter the RFQ number on the first screen? If not, I don't think the number is generated until after it is saved. Is that the problem, are you trying to pass the entered number to the other screen?

Rob

Read only

0 Likes
1,838

Hi Avinash,

Rob has a point here. Which RFQ number are you trying to pass? Is it the current one or a previously created one? If it is the current one that is being created, I don't know if at the point of your screen exit, the logic does a number assignment. You will have to find that out in debugging.

Srinivas

Read only

0 Likes
1,838

Srinivas - I don't think the number can be assigned until the RFQ is saved. It would cause too many problems with missing document numbers (Auditors don't like that) or attempts to save duplicate document numbers. But this screen does allow the external assignment of RFQ numbers. In that case, it would be ok.

Rob

Read only

0 Likes
1,838

I was referring to the standard logic, not the custom logic, when I asked about number assignment. Sometimes, in some document creations, the call to 'GET_NEXT_NUMBER' happens before a user exit is being called. So I was just wondering if in this case, the standard code already executed this function module and obtained a RFQ number. I know that it will not be there in the database until it is saved.

I am just curious as to what the table control shows taking a RFQ number that is not yet created, unless it is an existing RFQ. I think it is requirement tracking number or a reference document number that the other program will show details about.

Srinivas

Read only

0 Likes
1,838

Well I think that regardless, a number can be assigned if and only if it will actually be created.

Rob

Read only

0 Likes
1,838

I agree.

Read only

Former Member
0 Likes
1,838

Avinash, hi

If the you mean a subscreen exit, a component of an SAP standard enhancement, then there should also be at least two function module exits available as components of the enhancement as well. One for the subscreen PBO flow logic and one for the subscreen PAI flow logic.

Create a new function group in the customer namespace, define your new screen in this function group, add a function module with an importing parameter suitable for the pushbutton value, call the new screen from within this function module using the parameter as required (transfer it to a global variable in the function group if necessary), call this function module from within the subscreen PAI function module exit's include program if the pushbutton is triggered (CASE the OK code field for the pushbutton function code).

The process is similar with a BADI subscreen exit. There are always at least two methods, one to call the function module for the subscreen PBO and one to call the function module for the subscreen PAI. In a BADI the subscreen will be defined in a function group supplied with the BADI along with at least two function module exits in the function group, for the PBO and PAI. This is because you can't define screens in ABAP Objects, i.e. you can't define the screen in the BADI itself.

Hope this helps.

Regards

Mark

Read only

Former Member
0 Likes
1,838

Hi Avinash,

Let us say the user presses this pushbutton. That should trigger the PAI. I am assuming in here you have your call transaction. I am also assuming that this transaction that you are calling is a custom transaction. Instead of doing just a 'CALL TRANSACTION ZZZ', you can do a 'call transaction ZZZ using bdcdata'. You fill the 'bdcdata' for the initial or selection screen(depending on if it is a dialog transaction or report transaction). Here the assumption is that this transaction has a parameter on the initial or selection screen to accept the RFQ value.

Please let me know if this is what you are trying to achieve.

Srinivas

Read only

Former Member
0 Likes
1,838

Thanks to all,

My problem solved....

Avinash

Read only

0 Likes
1,838

If you don't mind, can you post what the solution was and also please close the post once solved.

Thanks,

Srinivas