‎2012 Apr 25 10:22 AM
Hi,
I am calling ME51N Transaction from my module pool.in my module pool selection screen I am giving quantity and material number ,as per this information it should display in me51n transaction..for ex if i enter matnr-152 and quantity 3 ,me51n transaction should show 3 line items of 152 material.
If I use create_item method in me_process_req_cust-open method its creating but all other fields are in display mode..how to solve this?any clue
Regards,
Kavitha
‎2012 Apr 25 5:20 PM
Hi,
What is the value you are passing in importing parameter IM_TRTYP and changing parameter CH_DISPLAY_ONLY, check if changing the values there might be any change.
Try passing B in IM_TRTYP importing parameter for that method.
IM_TRTYP values must be
'A' for Display
'B' for Create
'V' for Change
Thanks & Regards
Bala Krishna
‎2012 Apr 26 6:12 AM
Hi,
Thanks for your reply.
I need to create like default line items based on material and quantity entered in ztransaction.I created line items through open method of me_process_req_cust like this.
CALL METHOD im_header->create_item
EXPORTING
im_item = im_data
RECEIVING
re_item = im_data.
item_data-knttp = 'A'.
item_data-werks = 'CORP'.
item_data-ekgrp = 'ITA'.
item_data-menge = '1'.
item_data-bwtar = 'N.INDEGEN'.
im_datax-txz01 = 'X'.
im_datax-knttp = 'X'.
im_datax-werks = 'X'.
im_datax-ekgrp = 'X'.
im_datax-menge = 'X'.
* IM_DATAX-BEDNR = 'X'.
im_datax-bwtar = 'X'.
im_datax-matnr ='X'.
im_datax-bsart ='X'.
CALL METHOD im_data->set_datax
EXPORTING
im_datax = im_datax.
CALL METHOD im_data->set_data
EXPORTING
im_data = item_data.
created line items are coming in display.while calling create_item method,wont it automatically triggers to process_item method. Either I need these line items should come in change mode or to trigger process_item method before displaying screen.Please help me out if you have any idea.
Regards,
Kavitha
‎2012 Apr 26 6:40 AM
Hi,
There is a Method OPEN in the Badi E_PROCESS_REQ_CUST, with an Exporting parameter IM_TRTYP pass the value 'B' to that and try.
Thanks & Regards
Bala Krishna
‎2012 Apr 26 6:50 AM
Hi Bala,
Im_trtyp is importing parameter,it cannot be changed.
How to create default line items in ME51n Transaction?I need help on this
Regards,
Kavitha