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: 

Reg:Me_process_req_cust

Former Member
0 Kudos
182

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

4 REPLIES 4

former_member585060
Active Contributor
0 Kudos
53

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

0 Kudos
53

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

0 Kudos
53

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

0 Kudos
53

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