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

Alternate method for LSMW

Former Member
0 Likes
807

Hi friends, kindly let me know alternate solution for my problem.

Q. For transacton code MB11 iam posting the data through LSMW using standard program RM07MMBL(Batch input program). This program is having structure called BMSEG it will accept only one record per transaction.

In my flat file iam having total 20000 records, due to this iam getting performance issue.

Could you please tell me alternate method for the same?

Regards,

Sreenivasa Babu,

9866123064.

Hi friends, kindly let me know alternate solution for my problem.

Q. For transacton code MB11 iam posting the data through LSMW using standard program RM07MMBL(Batch input program). This program is having structure called BMSEG it will accept only one record per transaction.

In my flat file iam having total 20000 records, due to this iam getting performance issue.

Could you please tell me alternate method for the same?

Regards,

Sreenivasa Babu,

9866123064.

5 REPLIES 5
Read only

varma_narayana
Active Contributor
0 Likes
749

Hi srinivas..

In this Case it will be better to Call BAPI than using LSMW.

We have the BAPI_GOODSMVT_CREATE which is used to Create Goods movement.

It will be faster since the Data will not be processed in Screens when we Call BAPI.

Sample code to Call this BAPI:

data : gm_header type bapi2017_gm_head_01,

gm_code type bapi2017_gm_code value '01',

gm_headret like bapi2017_gm_head_ret,

matdocument type bapi2017_gm_head_ret-mat_doc,

t_gmitem type table of bapi2017_gm_item_create,

wa_gmitem type bapi2017_gm_item_create,

t_gmsernumber type table of bapi2017_gm_serialnumber,

wa_gmsernumber type bapi2017_gm_serialnumber,

ret type table of bapiret2.

gm_header-pstng_date = '20051201'.

gm_header-doc_date = sy-datum.

gm_code = '01'.

wa_gmitem-material = 'SAMPLE'.

wa_gmitem-plant = '0001'.

wa_gmitem-stge_loc = '0001'.

wa_gmitem-move_type = '501'.

wa_gmitem-entry_qnt = 10.

append wa_gmitem to t_gmitem.

wa_gmsernumber-matdoc_itm = 10.

wa_gmsernumber-serialno = 1.

append wa_gmsernumber to t_gmsernumber.

call function 'BAPI_GOODSMVT_CREATE'

exporting

goodsmvt_header = gm_header

goodsmvt_code = gm_code

  • TESTRUN = ' '

importing

  • GOODSMVT_HEADRET =

materialdocument = matdocument

  • MATDOCUMENTYEAR =

tables

goodsmvt_item = t_gmitem

goodsmvt_serialnumber = t_gmsernumber

return = ret

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

write:/ matdocument.

<b>reward if helpful</b>

Read only

0 Likes
749

Hai varma,

Is there any alternate way to acheive this with out using BAPI.

and i supposed to use direct input method.

PL advice.

Thnx in advance

Read only

0 Likes
749

The only method left is BDC.

Read only

BH2408
Active Contributor
0 Likes
749

Hi Sree,

Better way is write the BDC program with Session method . Bcoz here u have huge data . So better go a head with BDC -session method.

Regards,

Bharani

Read only

Former Member
0 Likes
749

If you're worried about performance, BAPI will be fastest