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: 

How to perform "Enter" operation via code in call transaction

Former Member
0 Kudos

Hi Folks,

In my module pool program, I am calling a transaction code and passing the required input parameters to the called screen.

I want to perform enter operation after calling the tcode through my code.

As I pass input parameters via bdcdata structure,is there are way to perform the enter operation similarly??

Thanks and Regards,

Kawish.

1 ACCEPTED SOLUTION

archanapawar
Contributor
0 Kudos

Hi Kawish,

I hope this is what you are looking for. Try with ok code '/00' or '=ENT1'.


PERFORM bdc_field       USING 'BDC_OKCODE'

                                        '=ENT1'.

9 REPLIES 9

archanapawar
Contributor
0 Kudos

Hi Kawish,

I hope this is what you are looking for. Try with ok code '/00' or '=ENT1'.


PERFORM bdc_field       USING 'BDC_OKCODE'

                                        '=ENT1'.

0 Kudos

Hi Archana,

Thanks for your reply.

I call this routine.But it does not triggers the enter event automatically in the called transaction.

I also checkd the SHDB and using the bdc_okcode value accordingly.

Thanks and Regards,

Kawish

0 Kudos

ok. did you check your call transaction in program in 'A' mode or 'E' mode? It will give you clear idea where you are stuck and from which point you are unable to proceed further.

0 Kudos

It works with E mode.

I dont know how 🙂

Thanks,

Kawish

0 Kudos

You must be facing some error in 'N' mode that's why it was not working. In 'E' mode, BDC stops at the time some message is encountered. If you press enter there, BDC will further proceed as normal, so, it will work in 'E' mode, but you need to handle that message in background to make BDC work in background.

I hope I am clear.

0 Kudos

OK I understand.

Thanks for the info,

Kawish

Former Member
0 Kudos

Maybe add the 'AND SKIP FIRST SCREEN' addition to your CALL TRANSACTION statement ?

himanshu_gupta13
Employee
Employee
0 Kudos

Hi,

You can use the below function module to call the enter event dynamically in programming.

On calling transaction, in calling program just checked that it has been called by another one then use below function module.

*Begin-Auto triggers ENTER command

     CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'

       EXPORTING

            functioncode           = 'ENTER'

       EXCEPTIONS

            function_not_supported = 1

            OTHERS                    = 2.


Many Thanks / Himanshu gupta

0 Kudos

Hi Himanshu,

Thanks for your reply.

I am not sure where to call this function module.

If I call it in the PBO of the called transaction, It does not directs to PAI---(Enter Event block).

No action will take place if i call the same in the calling program.

Thanks and Regards,

Kawish