Creation of SC or POs based on the Company Code restriction

10-11  Source: Network gathering  Views:1 

Advertisement
Dear All,
I am abaper and I am new to SRM. Ours is SRM 4.0 using Extended Classic Scenario
we got one requirement that one company ex: SE04 should be blocked for further ordering of SC and POs. i.e. when creating any SC or PO they dont want to use 'SE04'.  If selected it should throw an error message "Company Code SE04 can't be used for Procurement".
I wrote code in BBP_DOC_CHECK_BADI-BBP_DOC_CHECK like this..
IF  flt_val = 'BUS2121'. "When create SC
  LOOP AT lt_item INTO ls_item WHERE be_co_code = 'SE04'
                                    AND del_ind <> 'X'.
    CLEAR ls_message.
    ls_message-msgty   = 'E'.
    ls_message-msgid   = 'BBP_PU'.
    ls_message-msgno   = '001'.
    ls_message-msgv1   = text-001.
    APPEND ls_message TO et_messages.
  ENDLOOP.
endif.
and for po also BUS2201 we done the same.
it is working fine for creation of SC and POS, but when we are chaning old SC or POs for 'SE04'  then also error is coming "Company Code SE04 can't be used for Procurement".
When I put break point in BBP_DOC_CHECK_BADI-BBP_DOC_CHECK it is not stopping there also.
Please guide me for this..
Thanks,
Kiran Madineni
I written code like this: now working for old SC and POs.
IF  flt_val = 'BUS2121'. "When create SC
    IF cs_header-created_at >= '20110110000000'.
*if sy-title = 'Shop' and ( sy-tcode = 'BBPSC01' or sy-tcode = 'BBPSC02' or sy-tcode = 'BBPSC03' ).
      IF sy-tcode = 'BBPSC01' OR sy-tcode = 'BBPSC02' OR sy-tcode = 'BBPSC03'
        OR ( sy-tcode = 'BBPSC04' AND sy-title = 'Change Shopping Cart' ).
        LOOP AT lt_item INTO ls_item WHERE be_co_code = 'SE04'
                                          AND del_ind <> 'X'.
          CLEAR ls_message.
          ls_message-msgty   = 'E'.
          ls_message-msgid   = 'BBP_PU'.
          ls_message-msgno   = '001'.
          ls_message-msgv1   = text-001.
          APPEND ls_message TO et_messages.
        ENDLOOP.
      ENDIF.
    ENDIF.
  ENDIF.
For POS BUS2201
Thanks
Kiran.
Related articles
  • Creation of SC or POs based on the Company Code restriction 10-11

    Dear All, I am abaper and I am new to SRM. Ours is SRM 4.0 using Extended Classic Scenario we got one requirement that one company ex: SE04 should be blocked for further ordering of SC and POs. i.e. when creating any SC or PO they dont want to use 'S

  • To limit the access of PM data based on the Company Code, Plant & Location 10-11

    Hi Experts,          I have a requirement . Customer wants to Restrict the access of PM data for a user based on the company code, Plant & Location. Say user : XYZ Plant :1000 CCODE:1000 Location:0001 So you can see data of only this Organisation str

  • Creation of internal table dynamically based on the Date Range entered 10-11

    Hi SAPgurus, I have been facing one issue i.e creation of internal table dynamically based on the date range entered in the selection screen. For example the date range I am giving as 06/2006 to 08/2006, it should display the Fieldcatelog dynamically

  • The appearance of the company code segment of G/L account is based 10-11

    Hi, The appearance of the company code segment of G/L account is based  on which factors influenced which one  account group or fieldstatuts group/posting key  which one is influenced  Mnay thanks MvNrHi Gl account  influenced by Account group postin

  • Change the company code in a sales-order 10-11

    Our client is working only with one sales org 1000 assigned to one company code 1000 but having 14 other company codes and also having different plants which are individually assinged to different company codes at the clients requirment and to only o

  • Use of half months in the company code configuration after  Go Live 10-11

    Hi, Our client has a requirement to activate the functionality of u201CUse of half months in the company code configuration in Asset accounting after 3 month of Go live. For the above purpose, we enabled the same in our Development server (DE5) after

  • No Suitable Items found for PO (error M8035) while doing MIRO against service PO for the 1st time in the Company Code 10-11

    Hi I am encountering the error M8035 (" No Suitable Items found for PO ") while I am doing MIRO for the 1st time against service POs (item cat - D) in a company code. in OMSY the period opened for the company code is : Current 06 2014 previous 0

  • The tax code entered is not defined in the company code country. 10-11

    Dear sap guru's I am facing a problem while doing invoice or while cancelling the invoice or even during Subsequent Credit/Debit Tax code V0 in procedure  is invalid    Message no. FF704 Diagnosis    The tax code entered is not defined in the company

  • Creation of referenc BP in SD for different company code from IS-U system 10-11

    Dear Friends, I have two company codes called 2000 and 3000 in my IS-U system. I would like to create SD ref customer with reference to BP created in the IS-U system. I created SD reference customer with 2000 company code along with sales data's and

  • Budgeting at the company code level 10-11

    Hi Experts, My client is in Sales and Distribtuion company and they are having sales budget and procurement budget along with financial budget at the company code level down to the branches.And also they will budgeted the advertisement and sales prom

  • "Check Business Area of the company code" error while posting stock 10-11

    Hi Experts, While posting stock to a storage location of a plant , the system is giving me the following error message : "Check Business Area of the company code" . Would highly appreciate if I could get some info for this error message and how

  • "The company code does not exist or has not been fully maintained" in mm01 10-11

    Hi all, I am creating a material, it needs me to provide company code. when I gave out my company code, it reports: "The company code ZXXX does not exist or has not been fully maintained". what should the problem be? thanks and regards, Smaosn Z

  • Period open for both the company codes 10-11

    Hi All, I have a scenario wherein one company code has been made defunct and its marketing activity have been transfered to another company code which hitherto only takes care of manufacturing.  The customers of the defunct company code have been ext

  • HOW TO CAPTURE THE COMPANY CODE IN MIR7 10-11

    Hi ALL, MIRO data transfer i am facing some problem initially i am capturing the Company code in MIRO after that i am filling up all those values. for my requirement 1.i want to hold the company code screen initially at all time other wise 2. i am ge

  • Wrong business area assigned to the company code 10-11

    Hi All , I am getting error " Wrong business area assigned to the company code  " while posting a document in F- 02 please adviseDear Balasubramaniyan, You can supress the field Business area field in Field status Groups. For this follow the fol

  • The company code 5000 can no longer be initialized 10-11

    Hi, In omsy, i need to change the year from 2012 to 2011 but is not able to do so and gives the error MM011 (the company code 5000 can no longer be initialized). I have the materials and PO but GR is not done. Kindly help << Priority normalized >

  • To get the company code and country grouping attached to a position 10-11

    Hi everyone, I have a position and I need to get the company code and the country grouping that this position is attached to. Could you kindly suggest an FM or a class which would fetch the above data keeping in mind the inheritance tree. That is, if

  • Settings in program RFF0GB_T for printing the company code address? 10-11

    Hi All, I want to print the company code address in the header window of the sapscript. I copied the F110_IN_AVIS to Z . in the Program RFF0GB_T, the structure SADR whose fields are being used gets filled up if the finaa-nacha = 2 means of Fax type.

  • To view the company code wise cost and profit centers 11-30

    hi all, how to know the company code wise cost centers and profit centers? and what is the transactin codes for this? Regards, SomaHi Soma, Could you try Table-->CSKS. I believe it will give you the complete list of Cost Centers and the default Profi

  • Vendor if not maintained at the company code level 11-30

    Hi, System should not save the PO, if the vendor has not maintained at the company code level. How to achieve this? Regards, Sattuj> System should not save the PO, if the vendor has not maintained at the company code level. How to achieve this? Vendo