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: 

2 issues with call transaction to LS24

Former Member
0 Kudos

Hello All,

There are 2 issues with call transaction to LS24.

<b>1) It doesn't take batch value and displays stock for all batches.

2) When you go back, it doesn't go back to the calling program.</b>

Any thoughts ?

<u>Here is my code:</u>

PARAMETERS: p_lgnum TYPE lgnum,

p_matnr TYPE matnr,

p_werks TYPE werks_d,

p_lgort TYPE lgort_d,

p_charg TYPE charg_d.

START-OF-SELECTION.

- - - -

- - - -

END-OF-SELECTION.

PERFORM display_stock_per_batch.

&----


*& Form DISPLAY_STOCK_PER_BATCH

&----


FORM display_stock_per_batch .

SET PARAMETER ID 'LGN' FIELD p_lgnum.

SET PARAMETER ID 'MAT' FIELD p_matnr.

SET PARAMETER ID 'WRK' FIELD p_werks.

SET PARAMETER ID 'LAG' FIELD p_lgort.

SET PARAMETER ID 'CHA' FIELD p_charg.

CALL TRANSACTION 'LS24' AND SKIP FIRST SCREEN.

ENDFORM. " DISPLAY_STOCK_PER_BATCH

8 REPLIES 8

Former Member
0 Kudos

Hi Chandi,

Instead of using call transaction, you could use a BDC for the process in the transaction LS24. Just record it at SHDB and adjust the variables, and it will return for sure to your calling program.

Hope it helps.

Regards,

Gilberto Li

0 Kudos

This is a report, and when I double click on batch it should go to LS24. Why BDC?

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try to use this FM ABAP4_CALL_TRANSACTION.

For parameter ID, you can fill up table parameter SPAGPA_TAB.

Hope this will help.

Regards,

Ferry Lianto

0 Kudos

Same proble with the FM too.. any other ideas?

Thanks,

Chandni

Former Member
0 Kudos

Hi,

You can write a small bdc to call LS24..

Thanks,

Naren

Former Member
0 Kudos

Hi Pl. make sure the material data given by you are correct and present in the plant. It may stop the transaction at 1st stage.

Former Member

I know its been a long time since you posted this question. This reply is in response to your second issue. Actually when you go to a transaction from another transaction, you can return to the original transaction if the second transaction supports it. For VL33N, VL03N etc, this is supported. Hence you can have hotspots in your report which take you to these transactions and come back to your program by pressing the return key. For LS24 however this functionality doesn't exist. I learnt this the hard way by debugging the code after I pressed return from LS24 and when I pressed return from VL33N. In VL33N, there is a leave program command which is absent in LS24.

You can conform this by going to OSS if you have access. This issue can be resolved by applying a 'Note', and a 'Correction'. The numbers of these notes and corrections depends on your SAP version. And in most cases, the basis personnel apply these notes, hence you need to bring this issue to their attention.

Hope this is helpful for someone who stumbles upon this problem in future.

Former Member
0 Kudos

hello

use this code

perform bdc_dynpro using 'SAPML01S' '0209'.

perform bdc_field using 'BDC_CURSOR'

'RL01S-CHARG'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'RL01S-LGNUM'

p_lgnum.

perform bdc_field using 'RL01S-MATNR'

p_matnr.

perform bdc_field using 'RL01S-WERKS'

p_werks.

perform bdc_field using 'RL01S-LGORT'

p_lgort.

perform bdc_field using 'RL01S-BESTQ'

'*'.

perform bdc_field using 'RL01S-SOBKZ'

'*'.

perform bdc_field using 'RL01S-CHARG'

p_charg.

perform bdc_dynpro using 'SAPML01S' '0209'.

perform bdc_field using 'BDC_OKCODE'

'/EBACK'.

perform bdc_field using 'BDC_CURSOR'

'RL01S-LGNUM'.

perform bdc_transaction using 'LS24'.

may be it will help u