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: 

Defaulting value of Atab-Rel in POs in SAP IS-retail

Former Member
0 Kudos
249

Hi

I have a requirement where the value of a field in a PO at the item level should be defaulted. The details are:

In a PO at the Item level : in the RETAIL tab; the field<b> ATab-Rel</b> (Allocation table relevant) should always be defaulted to 'Allocation table relevant:flow through'. This field is Mepo1322-AUREL. It has a value range defined at the domain level and the value should be 3.

Can this be done through Config? Or is there a userexit in the PO program to do this?

Nagender

6 REPLIES 6

Former Member
0 Kudos
159

Hi

Find the available exits with the following program:::

&----


*& Report ZFINDUSEREXIT

*&

&----


*&

*&

&----


report zfinduserexit.

tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.

tables : tstct.

data : jtab like tadir occurs 0 with header line.

data : field1(30).

data : v_devclass like tadir-devclass.

parameters : p_tcode like tstc-tcode obligatory.

select single * from tstc where tcode eq p_tcode.

if sy-subrc eq 0.

select single * from tadir where pgmid = 'R3TR'

and object = 'PROG'

and obj_name = tstc-pgmna.

move : tadir-devclass to v_devclass.

if sy-subrc ne 0.

select single * from trdir where name = tstc-pgmna.

if trdir-subc eq 'F'.

select single * from tfdir where pname = tstc-pgmna.

select single * from enlfdir where funcname =

tfdir-funcname.

select single * from tadir where pgmid = 'R3TR'

and object = 'FUGR'

and obj_name eq enlfdir-area.

move : tadir-devclass to v_devclass.

endif.

endif.

select * from tadir into table jtab

where pgmid = 'R3TR'

and object = 'SMOD'

and devclass = v_devclass.

select single * from tstct where sprsl eq sy-langu and

tcode eq p_tcode.

format color col_positive intensified off.

write:/(19) 'Transaction Code - ',

20(20) p_tcode,

45(50) tstct-ttext.

skip.

if not jtab[] is initial.

write:/(95) sy-uline.

format color col_heading intensified on.

write:/1 sy-vline,

2 'Exit Name',

21 sy-vline ,

22 'Description',

95 sy-vline.

write:/(95) sy-uline.

loop at jtab.

select single * from modsapt

where sprsl = sy-langu and

name = jtab-obj_name.

format color col_normal intensified off.

write:/1 sy-vline,

2 jtab-obj_name hotspot on,

21 sy-vline ,

22 modsapt-modtext,

95 sy-vline.

endloop.

write:/(95) sy-uline.

describe table jtab.

skip.

format color col_total intensified on.

write:/ 'No of Exits:' , sy-tfill.

else.

format color col_negative intensified on.

write:/(95) 'No User Exit exists'.

endif.

else.

format color col_negative intensified on.

write:/(95) 'Transaction Code Does Not Exist'.

endif.

at line-selection.

get cursor field field1.

check field1(4) eq 'JTAB'.

set parameter id 'MON' field sy-lisel+1(10).

If there are no available user exits you could go for badi's.

To search for a badi, go to se 24 display class cl_exithandler. double click on method get_instance, get a break point on case statement. execute and start the required transaction in new session. look for variable exit_name. It would show the available badi's.

I suppose u r working with me21/me22n so check if any of following helps...

AMPL0001 User subscreen for additional data on AMPL

LMEDR001 Enhancements to print program

LMELA002 Adopt batch no. from shipping notification when posting a GR

LMELA010 Inbound shipping notification: Transfer item data from IDOC

LMEQR001 User exit for source determination

LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt

LWSUS001 Customer-Specific Source Determination in Retail

M06B0001 Role determination for purchase requisition release

M06B0002 Changes to comm. structure for purchase requisition release

M06B0003 Number range and document number

M06B0004 Number range and document number

M06B0005 Changes to comm. structure for overall release of requisn.

M06E0004 Changes to communication structure for release purch. doc.

M06E0005 Role determination for release of purchasing documents

ME590001 Grouping of requsitions for PO split in ME59

MEETA001 Define schedule line type (backlog, immed. req., preview)

MEFLD004 Determine earliest delivery date f. check w. GR (only PO)

MELAB001 Gen. forecast delivery schedules: Transfer schedule implem.

MEQUERY1 Enhancement to Document Overview ME21N/ME51N

MEVME001 WE default quantity calc. and over/ underdelivery tolerance

MM06E001 User exits for EDI inbound and outbound purchasing documents

MM06E003 Number range and document number

MM06E004 Control import data screens in purchase order

MM06E005 Customer fields in purchasing document

MM06E007 Change document for requisitions upon conversion into PO

MM06E008 Monitoring of contr. target value in case of release orders

MM06E009 Relevant texts for "Texts exist" indicator

MM06E010 Field selection for vendor address

MM06E011 Activate PReq Block

MMAL0001 ALE source list distribution: Outbound processing

MMAL0002 ALE source list distribution: Inbound processing

MMAL0003 ALE purcasing info record distribution: Outbound processing

MMAL0004 ALE purchasing info record distribution: Inbound processing

MMDA0001 Default delivery addresses

MMFAB001 User exit for generation of release order

MRFLB001 Control Items for Contract Release Order

<b>Please do reward if useful</b>

Regards

Dinesh

0 Kudos
159

Hi Dinesh

The issue is resolved. Thanks for your help. Awarded points appropriately.

Nag,

Former Member
0 Kudos
159

Hi,

You can look in to screen exists for the same the following use exit help u to write the logic.

BADI MEGUI_LAYOUT

MM06E005.

EXIT_SAPMM06E_012.

And don't forget to use

MMPUR_MESSAGE_FORCED

instead of

MESSAGE command.

U need to code this in PBO and to save the value in the field after the user has inpit data u need to write logic in the PAI module.

<b>rEWARD POINTS</b>

Regards

0 Kudos
159

Hi Dinesh and Skk

I have tried using enhancement MM06E005. There are a number of function exits including EXIT_SAPMM06E_006 , EXIT_SAPMM06E_007 and EXIT_SAPMM06E_012 which are getting triggered during the execution ME21n. But even after the value of TEKPO-AUREL is modified, the PO is not defaulting to the changed value.

Can someone please elaborate on the logic.

Thanks

Nag

Former Member
0 Kudos
159

Re: SAP IS Retail Experience SAP Retail Sr. Consultant (Atlanta, GA

I'm wondering if someone can help. I need Candidates with SAP IS-Retail experience. If interested let me know.

Its full-time opening

yangmichell@gmail.com

Former Member
0 Kudos
159

Closed