Hi every one,

REQUIREMENT 1:

                  i have a requirement in ME21N(Po create)  pricing is determined as per the condition records maintained by our mm consultant but now he is asking for ZPCR he maintained value 09 in condition records but he asked to check the Material Master record( MBEW-VERPR by passingMBEW-BWKEY == EKPO-WERKS and MBEW- MATNR = MATNR ) and in that also if the price is mentioned let’s say 100 then it should replace the value 9 and if not found then i need to display the value maitained in condition record.

REQUIREMENT 2:

                in ME21N  if one condition type  ex: ZPCR is exist then other condition type ZDTY  should not appear and if ZPCR is not exist then ZDTY can exist for the material which is mentioned in line item( if the condition type ZDTY maintained for it) .

GO TO : VOFM and click on REQUIREMENTS.

/wp-content/uploads/2014/12/1_609582.jpg

NOW SELECT THE RELAVANT ONE(IN OUR CASE PRICING)


/wp-content/uploads/2014/12/2_609597.jpg


GO TO LAST AND ENTER THE REQUIREMENT NUMBER EX: 986.


/wp-content/uploads/2014/12/3_609598.jpg

Then click on enter it will ask you the access key enter the access key then continue.by default two form routines are created.

Now place the cursor after the form name and click on insert from the application toolbar. Now write your custom code with in the insert(all above is just exit)

/wp-content/uploads/2014/12/4_609606.jpg

data:v1 type mbewverpr.
**************************REQUIREMENT1*****************************************
* this select query is used to fetch the price if maintained in master record.
SELECT SINGLE VERPR FROM MBEW INTO V1 where matnr = kompmatnr and bwkey = kompwerks.
if v1 is not INITIAL.
read table tkomv[] INTO tkomv with key kschl = ‘PB00’.
IF SYSUBRC = 0.
tkomv
kbetr = v1.
modify TABLE tkomv.
ENDIF.
endif.
*************************REQUIREMENT2******************************************
read table tkomv[] with key kschl = ‘PB00’ TRANSPORTING NO FIELDS.
if sysubrc = 0.
delete tkomv[] where kschl = ‘SKTO’.
endif.

NOW GO TO SPRO

SAP REFERENCE IMG ———> MATERIAL MANAGEMENT ————> PURCHASING ———-> CONDITIONS ——->DEFINE PRICE DETERMINATION PROCESS ——-> DEFINE CALCULATION SCHEMA


/wp-content/uploads/2014/12/5_609628.jpg

Now find the relavant procedure which is active( and select it and click on control data


/wp-content/uploads/2014/12/6_609632.jpg

now enter the requirement that you created (ex: 986) as shown below.


/wp-content/uploads/2014/12/7_609647.jpg

Click on Save.

Testing the Requirement:


     

        A)     With Out Requirement: remove the requirement from the above screen and save.

                            

          Now go to ME21N

/wp-content/uploads/2014/12/8_609649.jpg

Select purchase orders

/wp-content/uploads/2014/12/9_609652.jpg

/wp-content/uploads/2014/12/10_609654.jpg

Click on execute

/wp-content/uploads/2014/12/11_609641.jpg

Click on adopt. Now observe the marked areas

/wp-content/uploads/2014/12/12_609657.jpg

B)     With Requirement: now add the requirement(ex: 986) in procedure and save it.now observe the difference.

       /wp-content/uploads/2014/12/13_609663.jpg









To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply