cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a transaction from output.

Former Member
0 Kudos

hi everybody,

my problem is .

i done a report and i am geting output also.

(kunnr,vbeln,vgbel)

Wen i am double clicking on Delevery no(vbeln)... it has to call the trasaction VL02n, and the cursor has to move Bill of lading(BOLNR) field of that transaction.

i done a littile code at AT USER-COMMAND event.

code is as follows.

SET PARAMETER ID 'VL' FIELD it_output-vbeln.

CALL TRANSACTION 'VL02N' AND SKIP FIRST SCREEN.

but the cursor is not going to the Bill of lading field.

Can any body help this.

thanx in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Karunakar,

Use this piece of code, it will work.. I checked it and it is fine.

perform bdc_dynpro using 'SAPMV50A' '4004'.

perform bdc_field using 'BDC_CURSOR'

'LIKP-VBELN'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'LIKP-VBELN'

'710000420'.

perform bdc_dynpro using 'SAPMV50A' '1000'.

perform bdc_field using 'BDC_OKCODE'

'=HDET_T'.

perform bdc_dynpro using 'SAPMV50A' '2000'.

perform bdc_field using 'BDC_CURSOR'

'LIKP-BOLNR'.

call transaction 'VL02N' using bdcdata

mode 'E'.

Regards,

Mayank Patel

Former Member
0 Kudos

Hello Reddy,

You can have a look at the command SET CURSOR.

Regards,

Sükrü

Former Member
0 Kudos

Hi Sükrü,

please send me the code.

TMNielsen
Contributor
0 Kudos

Hello Karunakar

I don't think the set cursor is the solution. You could use that command if you should modify the VL02n program, but you don't want to do that!

You need to send the bdcdata table with the call transaction command.

I'm not going to send you the code, but if you are not familiar with basic call transaction technique I can give you a hint: The contents of the bdcdata table should be like what you get when you make in a recording in SM35.

Best regards

Thomas Madsen Nielsen

Former Member
0 Kudos

hi thomas,

I wrote a BDC program to send the cursor to Bill of lading field.But what happening is ...

when i am first time double clicking on Delevry number Ok-prompt dialog box is appearing which is not good for user and also the cursor not moving to Bill of lading field.It is moving to before filed.

But i came back and double clicking on the Delevery field ..it is going directly to Bill of lading field without asking any Ok-CODE promt.

My problem is it is asking first time only...

The code is as follows.

FORM process_bdc .

CLEAR bdcdata.

bdcdata-program = 'SAPMV50A'.

bdcdata-dynpro = '4004'.

bdcdata-dynbegin = 'X'.

APPEND bdcdata.

CLEAR bdcdata.

bdcdata-fnam = 'LIKP-VBELN'.

bdcdata-fval = it_output-vbeln.

APPEND bdcdata.

CLEAR bdcdata.

bdcdata-fnam = 'BDC_OKCODE'.

bdcdata-fval = '/00'.

APPEND bdcdata.

*

CLEAR bdcdata.

bdcdata-program = 'SAPMV50A'.

bdcdata-dynpro = '1000'.

bdcdata-dynbegin = 'X'.

APPEND bdcdata.

CLEAR bdcdata.

bdcdata-fnam = 'BDC_OKCODE'.

bdcdata-fval = '=HDET_T'.

APPEND bdcdata.

CLEAR bdcdata.

bdcdata-program = 'SAPMV50A'.

bdcdata-dynpro = '2000'.

bdcdata-dynbegin = 'X'.

APPEND bdcdata.

CLEAR bdcdata.

bdcdata-fnam = 'BDC_OKCODE'.

bdcdata-fval = '=T\04'.

APPEND bdcdata.

CLEAR bdcdata.

bdcdata-fnam = 'BDC_CURSOR'.

bdcdata-fval = 'LIKP-BOLNR'.

APPEND bdcdata.

CALL TRANSACTION 'VL02N' USING bdcdata

MODE 'E'.

Former Member
0 Kudos

Hello thomas

i want answer for the above question.

plz help thomas

bye

TMNielsen
Contributor
0 Kudos

Hello again

Did you try to do a recording in SM35 ?

If its possible with a recording, you should also be able to solve your problem with ABAP.

best regards

Thomas Madsen Nielsen