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: 

at line selection in module pool

former_member333737
Active Participant
0 Kudos

Hello Experts.

I am working on module pool.

I have created a transaction where I need to create a order number when I press the 'SAVE' button.

My order number is getting created but my issue is I need to call a transaction when I click on this order number.

For eg: I am getting a message as 'ORDER NUMBER 50000645 SAVED.

When I will click on 50000645 I need to call transaction 'IWBK' and this order number needs to get entered in ORDER field name aufnr-low.

what should I write in pbo and pai?

Let me know if it is possible.

Thanks and Regrds,

Nikhil.

12 REPLIES 12

sravya_ch
Participant
0 Kudos

Hi Nikhil

In PBO write this Code

CASE R_UCOMM.

WHEN '&IC1'.

set parameter id 'ANR' field rs_selfield-VALUE.

CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.

ENDCASE.

where R_UCOMM LIKE SY-UCOMM.

Sravya

sridhar_meesala
Active Contributor
0 Kudos

Hi,

I think you are giving a success message after the order number is created. I don't think you can go to other transaction when you click on the order number in the success/information message. But you can do it by placing the order number in the screen and then checking the "respond to double click" check box for that field in the attributes window.

Thanks,

Sri.

faisal_altaf2
Active Contributor
0 Kudos

Hi, Nikhil

Test the following Sample Code Hope will Solve out your problem

DATA: it_bdcdata TYPE TABLE OF bdcdata,
      wa_it_bdcdata LIKE LINE OF it_bdcdata.

DATA opt TYPE ctu_params.

CLEAR wa_it_bdcdata.
wa_it_bdcdata-program  = 'RIAUFMVK'.
wa_it_bdcdata-dynpro   = '1000'.
wa_it_bdcdata-dynbegin = 'X'.
APPEND wa_it_bdcdata TO it_bdcdata.

CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'BDC_CURSOR'.
wa_it_bdcdata-fval = 'AUFNR-LOW'.
APPEND wa_it_bdcdata TO it_bdcdata.

CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'AUFNR-LOW'.
wa_it_bdcdata-fval = '50000645'. " Your Order Here
APPEND wa_it_bdcdata TO it_bdcdata.

opt-dismode = 'E'.

CALL TRANSACTION 'IWBK' USING it_bdcdata OPTIONS FROM opt.

Regards,

Faisal

kesavadas_thekkillath
Active Contributor
0 Kudos

You should have continued with this same thread

0 Kudos

Hi Keshu ,

I could have but it would have been more confusing.

Since I am trying it out in another way.

Thanks,

Nikhil.

Former Member
0 Kudos

Hi,

can you try this ...

AT line selection .

if (aufnr-low NE space).

set parameter ID 'AUF field aufnr-low.

call trasaction 'IWBK' and skip first screen.

endif.

clear input_field.

Thanks

manish

Former Member
0 Kudos

Hi,

From your question what i understood is you are using some conversion to create order number. Once created you want to display it..

But you cant do it by cliking the message that comes. what you can do is u can show the order number that got created in an alv list. From that alv you can use the interactive method to call the transaction.

Regards

Ansari

venkat_o
Active Contributor
0 Kudos

try this way

TABLES :mara.
SET PARAMETER ID 'MAT' FIELD mara-matnr.
CALL TRANSACTION 'MM01' AND SKIP FIRST SCREEN.

Thanks

Venkat.O

0 Kudos

Hi Venkat.

In module pool it doesnt accept at line selection command.

Any more ideas which I can implement.

Thanks,

Nikhil.

0 Kudos

Hi, Nikhil

Where you Order Number is Displaying me it is Text Field ? Check the *Element Type where it is Displaying than follow Steps Bellow.

--> Double Click on that Element it will open the Element Properties Box on the Right hand Side.

--> Bellow on this Box in Under Attributes Heading there are Three Tabs Dict, Program and Display

--> Select Display

--> Here a Check Box Responds to double-click

--> Check this one

Now on the Responds to double-click write my Above Given Code

Hope will work for you.

Reply in any Problem,

Best Regards,

Faisal

0 Kudos

Hi Faisal,

The order number which is getting created is coming from BAPI.

I have written this messages in another screen say 0110.

So I want to call another transaction 'iwbk' and where i can set order number field for this transaction in the field Order(AUFNR-LOW).

Hope I am clear.

Thanks,

Nikhil.

former_member333737
Active Participant
0 Kudos

issue solved thanks faisal for your bdc