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

Need help in user exits

Former Member
0 Likes
775

Hi,

I am working on purchase req. enhancement,i developed a subscreen at item level with 9 fields. the screen is coming properly.when i enter data, i have to store this data in eban table. for this i append a str with those fields.How can i update this screen data in eban table.Have to implement another exit or can i write in PBO and PAI.What's the code i have to write here.Pls waiting for your reply.

Thanks in advance,

Avinas M.

1 ACCEPTED SOLUTION
Read only

Vinod_Chandran
Active Contributor
0 Likes
737

Hi Avinash,

Are you using enhancement MM06E005? In that case you have to write code in the following function exits to pass data between screen and the structure.

EXIT_SAPMM06E_016 Export data to customer subscreen for item (PBO)

EXIT_SAPMM06E_017 Export data to customer subscreen for item (PAI)

EXIT_SAPMM06E_018 Import data from customer subscreen for item

Also for adding new fields did you use CI_EKPODB?

Please let me know if you need more help on this.

Thanks

Vinod

Hi,

I am working on purchase req. enhancement,i developed a subscreen at item level with 9 fields. the screen is coming properly.when i enter data, i have to store this data in eban table. for this i append a str with those fields.How can i update this screen data in eban table.Have to implement another exit or can i write in PBO and PAI.What's the code i have to write here.Pls waiting for your reply.

Thanks in advance,

Avinas M.

4 REPLIES 4
Read only

Vinod_Chandran
Active Contributor
0 Likes
738

Hi Avinash,

Are you using enhancement MM06E005? In that case you have to write code in the following function exits to pass data between screen and the structure.

EXIT_SAPMM06E_016 Export data to customer subscreen for item (PBO)

EXIT_SAPMM06E_017 Export data to customer subscreen for item (PAI)

EXIT_SAPMM06E_018 Import data from customer subscreen for item

Also for adding new fields did you use CI_EKPODB?

Please let me know if you need more help on this.

Thanks

Vinod

Read only

0 Likes
737

Hello,

If you are using MEREQ001 user exit.

----


  • INCLUDE ZXM02U01 *

----


***********************************************************************

  • Tables *

***********************************************************************

tables: eban.

***********************************************************************

  • Reading current status of purchase requisition object and assigning to

  • local structure

***********************************************************************

data: s_mereq_item type mereq_item,

s_temp type ref to if_purchase_requisition,

s_trtyp type mepo_document.

call method im_req_item->get_data receiving re_data = s_mereq_item.

  • assiging data to the fileds on screen

move-corresponding s_mereq_item to eban.

*eban-zctarc = s_mereq_item-zctarc.

*eban-zuscno = s_mereq_item-zuscno.

*eban-zuscit = s_mereq_item-zuscit.

*eban-z1eldsze = s_mereq_item-z1eldsze.

*eban-z1especs = s_mereq_item-z1especs.

*eban-zalstr = s_mereq_item-zalstr.

*eban-znumcc = s_mereq_item-znumcc.

*eban-znumch = s_mereq_item-znumch.

*eban-znumsu = s_mereq_item-znumsu.

*eban-zinco1 = s_mereq_item-zinco1.

*eban-zinco2 = s_mereq_item-zinco2.

*eban-zcrnam = s_mereq_item-zcrnam.

*eban-zzterm = s_mereq_item-zzterm.

*eban-z1ecrrep = s_mereq_item-z1ecrrep.

*eban-z1etelfx = s_mereq_item-z1etelfx.

*eban-zektel = s_mereq_item-zektel.

*eban-matnr = s_mereq_item-matnr.

call method im_req_item->get_requisition receiving

re_requisition = s_temp.

call method s_temp->get_transaction_state importing ex_document =

s_trtyp.

export s_trtyp-trtyp to memory id 'TRT'.

and in

----


  • INCLUDE ZXM02U03 *

----


************************************************************************

**

    • Tables

**

************************************************************************

tables : *eban.

data: ls_mereq_item type mereq_item.

*get values if PReq item exists

if not im_req_item is initial.

*read item data from system

ls_mereq_item = im_req_item->get_data( ).

*if customer field changed

if eban ne *eban.

*fill field with new value

move-corresponding eban to ls_mereq_item.

  • ls_mereq_item-zflag = eban-zflag.

*set new item data to system

call method im_req_item->set_data( ls_mereq_item ).

*tell the system that there has something changed on the customer tab

EX_CHANGED = 'X'.

endif.

endif.

Regards,

Shekhar Kulkarni

Read only

0 Likes
737

Dear Shekhar,

I've followed your example code but unfortunatelly I'm not getting the expected result...

The filed which I've aded into the customer screen is visible but unfortunatelly I'm not able to store the value in the table EBAN. I will highly apreciate if you could tell to a beginner which kind of code need to be created and in which includes...

Curently I've created your code in the ZXM02U01 and ZXMU03...but with this code the data is not stored in EBAN when saving. The value entered into the zz filed is lost after the 1st enter into the screen...

thanks in advance

Read only

Former Member
0 Likes
737

Hi shekar and vinod,

Thanks for your great help.I solved my problem with your solutions.

Thanks once again,

Avinash