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

Issue in session method for mb1b tcode

Former Member
0 Likes
1,078

Hi group,

I have done recording for mb1b tcode.

For each line item i am creating session in SM35.

If i post more than one line item then for each session same batch no (CHARG) is getting repeated.

i.e if one session is created with batch no say 1234 then for all the other session same batch number(1234)

is getting repeated.

I checked the internal table(BDCDATA) here batch numbers are getting populated properly.

Please let me know what is the issue??

Thanks in advance,

Greeshma

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,040

Issue was with refreshing bdcdata table.

Solved.

Thanks,

Greeshma

8 REPLIES 8
Read only

Former Member
0 Likes
1,040

Hello,

what kind of movement type are you using ?

check the parameter id for Batch (field charg), usually it keeps the last value used and assigns back when you are using transactions like MB1B or others related to batch. Depending on that you need to clear it and assign the new batch value.

let me know if this helps?

best regards,

swanand

Read only

0 Likes
1,040

Hi Swanand,

Thanks for the reply.

Can you please tell me how to check parameter id in session method??

I am using movement type 411(Transfer posting storage location).

Regards,

Greeshma.

Read only

0 Likes
1,040

hello,

when in MB1B go to the batch field, press F1 and then on that screen click Technical information(usually the forth icon with a hammer). This will give you the technical settings for that field. Do the same for batch field and you will get the information. Usually for batch the parameter id is 'CHA'.

bets regards,

swanand

Read only

0 Likes
1,040

Hi,

I wrote this code:

  data: v_pid type tpara-paramid value 'CHA',
          v_charg  type charg_d.

   GET PARAMETER ID v_pid FIELD v_charg.
      IF sy-subrc eq 0.
        set PARAMETER ID v_pid FIELD wa_ltap_vb-charg.
        endif.

But here sy-subrc is 4.

Any suggestions?

Regards,

Greeshma.

Read only

0 Likes
1,040

it should be fine, if the parameter id is not set it might be returning sy-subrc = 4

best regards

swanand

Read only

TuncayKaraca
Active Contributor
0 Likes
1,040

Hi Greeshma,

I recommend you use BAPI_GOODSMVT_CREATE (Post goods movements with MB_CREATE_GOODS_MOVEMENT).

If there is a BAPI use it, batch input session must be last option. Friendly suggestion

Read only

0 Likes
1,040

Hi I cant use BAPI since i have to post document inside LT12 tcode,

BAPI will give dump in such scenerios.

Regards,

Greeshma.

Read only

Former Member
0 Likes
1,041

Issue was with refreshing bdcdata table.

Solved.

Thanks,

Greeshma