2009 May 19 1:33 PM
Hi
After activating the exit MEREQ001 and enhanching the structure of ci_ebandb, which function exit we have to use ti save the data?
Is it necessary to use BADI??? as I am not comfortable with OO programing!!!!
Thanks
Hi
After activating the exit MEREQ001 and enhanching the structure of ci_ebandb, which function exit we have to use ti save the data?
Is it necessary to use BADI??? as I am not comfortable with OO programing!!!!
Thanks
2009 May 20 6:40 PM
Hi,
The Exit:
USER-EXIT : MEREQ001
COMPONENT: _ EXIT_SAPLMEREQ_003_
Sample Code:
ex_changed = 'X'.
IF sy-tcode = 'ME52N' OR sy-tcode = 'ME51N'.
DATA : req_ref TYPE REF TO if_purchase_requisition,
req_items TYPE mmpur_requisition_items,
req_item TYPE mmpur_requisition_item,
req_it_data TYPE mereq_item.
CALL METHOD im_req_item->get_requisition
RECEIVING
re_requisition = req_ref.
IF req_ref IS BOUND.
CALL METHOD req_ref->get_items
RECEIVING
re_items = req_items.
IF req_items IS NOT INITIAL.
LOOP AT req_items INTO req_item.
IF req_item-item IS BOUND.
CALL METHOD req_item-item->get_data
RECEIVING
re_data = req_it_data.
MOVE eban-zzmaktl TO req_it_data-zzmaktl.
MOVE eban-zzno TO req_it_data-zzno.
MOVE eban-zztext1 TO req_it_data-zztext1.
MOVE eban-zztext2 TO req_it_data-zztext2.
MOVE eban-zztext3 TO req_it_data-zztext3.
MOVE eban-zzrc4 TO req_it_data-zzrc4.
MOVE eban-zzpc5 TO req_it_data-zzpc5.
MOVE eban-zzisep TO req_it_data-zzisep.
MOVE eban-zzdsd TO req_it_data-zzdsd.
MOVE eban-zzres TO req_it_data-zzres.
MOVE eban-zzother TO req_it_data-zzother.
MOVE eban-zzgur_war TO req_it_data-zzgur_war.
MOVE eban-zzpbg TO req_it_data-zzpbg.
MOVE eban-zzinsp TO req_it_data-zzinsp.
MOVE eban-zzqre TO req_it_data-zzqre.
MOVE eban-zzcp_fx TO req_it_data-zzcp_fx.
MOVE eban-zzversion TO req_it_data-zzversion.
* Move all the custom screen fields.
CALL METHOD req_item-item->set_data
EXPORTING
im_data = req_it_data.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.Regards,
Ramani N
2009 May 20 11:15 PM
Hi Ramani,
I am currently working on Purchase Requsition Custom Data and Purchase Order Custom Data.
I am using the same enhancement. I am able to populate the custom data and retrieve it from database table for both Purchase Requisition and Purchase Order.
I have one field each on the custom data tab for both Purchase Order and Purchase Requistion. I have made these fields as mandatory on the screen. But when I am trying to exceute transaction ME51N (PR) or ME21N (PO), standard program is allowing me to save data withuting giving error for custom fields.
When I am going to Custom Tab, then it is mandatory to enter data fro custom fields.
Could you please help me out for resolving the problem?
Regards,
Anil Salekar
2009 May 21 6:14 AM
Hi,
How you did the field to be mandatory .....do it from function group XM02 ....creating a module under the screen which you have developed..
Thanks,
Shailaja Ainala.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |