Default internal order for each vendor

Hi
I am creating employee as a vendor in FK01. Each vendor is created as internal order for doing employeewise budget check. So when i book any expenses for vendor, i want that internal order should automatically flow on the basis of vendor.
So is there any way from where i can default internal order on the basis of vendor.
Edited by: Deepak Agrawal on Jun 9, 2011 5:05 PM

Hi
The only way to do the same is through Substitution rule by using an user exit. You need to create a Z table and maintain the mapping of vendor to IO. There after in GGB1, write a substitution rule for the node, complete document
Check if Vendor Account =X
Substitute using user exit
In the user exit call up the z table.
Regards
Sanil Bhandari

Similar Messages

  • Production Order and Internal Order for each item of the sales order

    Hi
       I am developing Make To Order Report where I have to display the MTO Line Items and non MTO Line Items. For non MTO Line Items I have to display Internal order with Planned and Actual Costs and also Production Order with Planned and Actual Costs. Could anybody tell how to get the Internal order no and production order with Planned and Actual costs for each line item for a sales order.
    Thanks
    Naga

    Hi,
    You can get the Production orders, Planned orders, Internal orders generated for Sales order item from AFPO table (use fields KDAUF-Sales order number & KDPOS-Sales order item). Then to identify the order type use order category (AUTYP) from table AUFK.
    Once you have the Production/internal order, you can ge the cost from COSS and COSP table. Use the object number from AUFK to get the cost entries from COSS & COSP.
    You can use the following sample code as reference.
    Hope this is helps.. (Don't forget to mark it... )
    Form GET_COSTS                                                       *
    Get the material cost, labour hours and the labour cost for the      *
    sales order material.                                                *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_COSTS.
      DATA V_OBJNR LIKE AUFK-OBJNR.
    DATA v_menge LIKE vbap-kwmeng.
      SELECT SINGLE OBJNR
        INTO V_OBJNR
        FROM AUFK
       WHERE AUFNR EQ AFPO-AUFNR.
      SELECT * FROM COSS
       WHERE OBJNR EQ V_OBJNR
         AND WRTTP IN ('01', '04'). " p_wrttp. "Labour Cost ( Plan, Actual)
        PERFORM GET_VALUES_FROM_COSS.
      ENDSELECT.
      SELECT * FROM COSP
       WHERE OBJNR EQ V_OBJNR
         AND WRTTP IN ('01', '04')         " p_wrttp
         AND KSTAR NE '0000510033'. " EQ p_kstar2.      "Material Cost
        PERFORM GET_VALUE_FROM_COSP.
      ENDSELECT.
    Get the unit cost of the production order by dividing the production
    cost by the order quantity. The result will be multiplied by the
    GL posting qunatity (Delivery quantity) to get the production cost
    for the quantity being deluivered.
      IF NOT AFPO-PSMNG IS INITIAL.
        OUT_REC-LABOUR_HOURS_ACT = OUT_REC-LABOUR_HOURS_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_HOURS_ACT =
                          OUT_REC-ADDNL_LABOUR_HOURS_ACT / AFPO-PSMNG.
        OUT_REC-LABOUR_HOURS_PLN = OUT_REC-LABOUR_HOURS_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_HOURS_PLN =
                         OUT_REC-ADDNL_LABOUR_HOURS_PLN / AFPO-PSMNG.
        OUT_REC-LABOUR_COST_ACT = OUT_REC-LABOUR_COST_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_COST_ACT =
                         OUT_REC-ADDNL_LABOUR_COST_ACT / AFPO-PSMNG.
        OUT_REC-LABOUR_COST_PLN = OUT_REC-LABOUR_COST_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_LABOUR_COST_PLN =
                         OUT_REC-ADDNL_LABOUR_COST_PLN / AFPO-PSMNG.
        OUT_REC-MATERIAL_COST_ACT = OUT_REC-MATERIAL_COST_ACT / AFPO-PSMNG.
        OUT_REC-ADDNL_MATERIAL_COST_ACT =
                         OUT_REC-ADDNL_MATERIAL_COST_ACT / AFPO-PSMNG.
        OUT_REC-MATERIAL_COST_PLN = OUT_REC-MATERIAL_COST_PLN / AFPO-PSMNG.
        OUT_REC-ADDNL_MATERIAL_COST_PLN =
                         OUT_REC-ADDNL_MATERIAL_COST_PLN / AFPO-PSMNG.
      ENDIF.
    Multiply the calculated Unit Production costs with the GL quantity to
    get the actual production cost of the quantity delivered.
    Calculation for Labour Hours
      OUT_REC-LABOUR_HOURS_ACT = OUT_REC-LABOUR_HOURS_ACT *
                                 OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_HOURS_ACT = OUT_REC-ADDNL_LABOUR_HOURS_ACT *
                                 OUT_REC-QUANTITY.
      OUT_REC-LABOUR_HOURS_PLN = OUT_REC-LABOUR_HOURS_PLN *
                                 OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_HOURS_PLN = OUT_REC-ADDNL_LABOUR_HOURS_PLN *
                                 OUT_REC-QUANTITY.
    Calculation for Material Cost
      OUT_REC-MATERIAL_COST_ACT = OUT_REC-MATERIAL_COST_ACT *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_MATERIAL_COST_ACT =
          OUT_REC-ADDNL_MATERIAL_COST_ACT * OUT_REC-QUANTITY.
      OUT_REC-MATERIAL_COST_PLN = OUT_REC-MATERIAL_COST_PLN *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_MATERIAL_COST_PLN =
          OUT_REC-ADDNL_MATERIAL_COST_PLN * OUT_REC-QUANTITY.
    Calculation for Labour cost
      OUT_REC-LABOUR_COST_ACT   = OUT_REC-LABOUR_COST_ACT *
                                   OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_COST_ACT = OUT_REC-ADDNL_LABOUR_COST_ACT *
                                  OUT_REC-QUANTITY.
      OUT_REC-LABOUR_COST_PLN   = OUT_REC-LABOUR_COST_PLN *
                                  OUT_REC-QUANTITY.
      OUT_REC-ADDNL_LABOUR_COST_PLN = OUT_REC-ADDNL_LABOUR_COST_PLN *
                                  OUT_REC-QUANTITY.
    Get the planned material cost from the total of the planned cost of
    the component materials in the production order confirmations.
      SELECT BWART MENGE MATNR SHKZG FROM AUFM
        INTO (AUFM-BWART, AUFM-MENGE, AUFM-MATNR, AUFM-SHKZG)
       WHERE AUFNR EQ AFPO-AUFNR.
        CHECK AUFM-BWART NE '101'.
        READ TABLE I_MBEW WITH KEY MATNR = AUFM-MATNR
                                   BWKEY = AFPO-DWERK.
        IF SY-SUBRC NE 0.
          SELECT MATNR BWKEY ZPLPR LPLPR PEINH
            FROM MBEW
            INTO I_MBEW
           WHERE MATNR EQ AUFM-MATNR
             AND BWKEY EQ AFPO-DWERK.
            APPEND I_MBEW.
          ENDSELECT.
        ENDIF.
        IF SY-SUBRC EQ 0.
          IF I_MBEW-ZPLPR NE 0.
            IF AUFM-SHKZG EQ 'H'.
              OUT_REC-PLANNED_MATERIAL_COST =
              OUT_REC-PLANNED_MATERIAL_COST +
                           ( I_MBEW-ZPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ELSE.
              OUT_REC-PLANNED_MATERIAL_COST =
              OUT_REC-PLANNED_MATERIAL_COST -
                           ( I_MBEW-ZPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ENDIF.
          ELSEIF I_MBEW-LPLPR NE 0.
            IF AUFM-SHKZG EQ 'H'.
              OUT_REC-CURRENT_MATERIAL_COST =
              OUT_REC-CURRENT_MATERIAL_COST +
                           ( I_MBEW-LPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ELSE.
              OUT_REC-CURRENT_MATERIAL_COST =
              OUT_REC-CURRENT_MATERIAL_COST -
                           ( I_MBEW-LPLPR * AUFM-MENGE / I_MBEW-PEINH ).
            ENDIF.
          ENDIF.
        ENDIF.
      ENDSELECT.
    Get the Future material cost per Unit by deviding the calculated
    Future material cost above with the goods reciept quantity to, then
    multiply the unit cost with the GL quantity to get the Future material
    Cost for the Quantity delivered. (Quantity in the entery from GLPCA
    Table).
      IF NOT AFPO-WEMNG IS INITIAL.
        OUT_REC-PLANNED_MATERIAL_COST =
           OUT_REC-PLANNED_MATERIAL_COST / AFPO-WEMNG * OUT_REC-QUANTITY.
        OUT_REC-CURRENT_MATERIAL_COST =
           OUT_REC-CURRENT_MATERIAL_COST / AFPO-WEMNG * OUT_REC-QUANTITY.
      ENDIF.
    ENDFORM.                               " GET_COSTS
    Form GET_VALUE_FROM_COSP                                             *
    Get the Material cost from COSP table.                               *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_VALUE_FROM_COSP.
      FIELD-SYMBOLS: <FS> TYPE ANY.
      DATA: V_COMPONENT TYPE I.
    Cummulate the posting values of all the 16 period buckets as to get
    total production order cost. This is to handle the aprtial posting of
    prodction order values in diffrent periods.
      V_COMPONENT = 15.
      DO 16 TIMES.
        ADD 1 TO V_COMPONENT.
        ASSIGN COMPONENT V_COMPONENT OF STRUCTURE COSP TO <FS>.
        IF COSP-WRTTP EQ '04' AND COSP-KSTAR EQ P_KSTAR2.
          ADD <FS> TO OUT_REC-MATERIAL_COST_ACT.
        ELSEIF COSP-WRTTP EQ '04'.
          ADD <FS> TO OUT_REC-ADDNL_MATERIAL_COST_ACT.
        ELSEIF COSP-WRTTP EQ '01' AND COSP-KSTAR EQ P_KSTAR2.
          ADD <FS> TO OUT_REC-MATERIAL_COST_PLN.
        ELSEIF COSP-WRTTP EQ '01'.
          ADD <FS> TO OUT_REC-ADDNL_MATERIAL_COST_PLN.
        ENDIF.
      ENDDO.
    ENDFORM.                               " GET_VALUE_FROM_COSP
    Form GET_VALUES_FROM_COSS                                            *
    Get the Labour cost and Labour hours from the COSS table.            *
    There are no interface parameters to be passed to this subroutine.   *
    FORM GET_VALUES_FROM_COSS.
      FIELD-SYMBOLS: <FS1> TYPE ANY,
                     <FS2> TYPE ANY.
      DATA: V_COMPONENT1 TYPE I,
            V_COMPONENT2 TYPE I.
    Cummulate the posting values of all the 16 period buckets as to get
    total production order cost. This is to handle the aprtial posting of
    prodction order values in diffrent periods.
      V_COMPONENT1 = 15.
      V_COMPONENT2 = 111.
      DO 16 TIMES.
        ADD 1 TO: V_COMPONENT1, V_COMPONENT2.
        ASSIGN COMPONENT V_COMPONENT1 OF STRUCTURE COSS TO <FS1>.
        ASSIGN COMPONENT V_COMPONENT2 OF STRUCTURE COSS TO <FS2>.
        IF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ P_KSTAR1.
          ADD <FS1> TO OUT_REC-LABOUR_COST_ACT.
          ADD <FS2> TO OUT_REC-LABOUR_HOURS_ACT.
        ELSEIF COSS-WRTTP EQ '04'.
          ADD <FS1> TO OUT_REC-ADDNL_LABOUR_COST_ACT.
          ADD <FS2> TO OUT_REC-ADDNL_LABOUR_HOURS_ACT.
        ELSEIF COSS-WRTTP EQ '01' AND COSS-KSTAR EQ P_KSTAR1.
          ADD <FS1> TO OUT_REC-LABOUR_COST_PLN.
          ADD <FS2> TO OUT_REC-LABOUR_HOURS_PLN.
        ELSEIF COSS-WRTTP EQ '01'.
          ADD <FS1> TO OUT_REC-ADDNL_LABOUR_COST_PLN.
          ADD <FS2> TO OUT_REC-ADDNL_LABOUR_HOURS_PLN.
        ENDIF.
      ENDDO.
    ENDFORM.                               " GET_VALUES_FROM_COSS

  • Using internal order for a gl in FBCJ Screen

    Hi All,
    I would ike to use internal order for GLs/Vendor accounts like employee vendors or MM vendors in the Cash Journal i.e. FBCJ Screen.Hos should I do it.
    Simillarly I would like to give the work order /po reference for such advances in the FBCJ Screen.Is it possible to do it?
    Thanks in advance for your replies.
    Regards,
    Manoj mehta

    Hi Manoj,
    It is possible to use Internal Order for GLs/Vendor accounts like employee vendors or MM vendors in the Cash Journal i.e. FBCJ Screen. The internal order field maybe invisble on the screen.Follow the following steps:
    1. Click on the Configuration tab - Blue, Yellow, White Striped Square on the right top corner of FBCJ Screen.
    2. It will open the Table Setting Tab, Click on Administrator.
    3. It will open Edit System Settings, Check whether the in the cloumn, order is having tick in the Invisible Column. If it is ticked remove the tick & click on Activate.
    4. Close the Edit System Settings  & Save the Table Settings.
    Thank You.

  • Down payment against the Internal Order - for Capital Expenditure

    Dear friends
    I am getting an error while making down payment against the purchase order.
    The order of my entries or steps are as follows:
    Created one internal order for Capital WIP with budget and availability control activation.
    Created one purchase order against a vendor with reference to the above Internal Order.
    When I am making the down payment to the vendor through tcode:F-48, the system throwing an error
    "Define Cost Elements for Down Payments".
    Can any one please explain why this error is coming. When I checked in Internal orders, there is a TCode: OKEP for Define Default Cost Elements for Down Payments.
    System is asking for cost element, but where as what ever the down payment we are making is nothing but advance which is current asset. Why system is asking for cost element?
    Can any one give me the guidance how to handle the issue.
    Thanks in Advance
    Kiran Kumar A

    The reason is when you want the down payment for AUC to be capitalised, then you would need to create cost element for Downpayments.
    Normally as per design of SAP, down payment being a Balance Sheet Account (Current Asset as you rightly mentioned) doesnot need / accept an Cost object, as a special case since down payments for AUC needs to be capitalised and hence need to be carried to Controlling (Internal Order) by creating Cost Element for Downpayments.
    Go ahead and create the cost element. That would resolve your issue.

  • Default Sort Order for Library View

    It would be fantastic if there were a user defined preference for a default sort order in Library view. For example, some users may prefer to always view the images by File Name, or Rating, etc, without having to change the sort order for each individual folder they view via Lightroom.
    Thanks!

    Thanks for your suggestion Allan, but it doesn't work.
    I'm specifically referring to the defaults that Aperture 3 adopts when you use the "File, Import, Folders as Projects with the projects and albums setting.
    What I'm finding is regardless of the setting in the Library preferences, the default sort order for the project is Date and Manual for the album.
    Yet if I create a project manually the default sort order is as per the Library prefs. Strange.

  • How to create one primary key for each vendor

    Hi all
    i am doing IDOC to jdbc scenario
    i am triggering idoc from R/3 and the data is going into DB table vendor through XI.
    structures are as follows:
    sender side: ZVendorIdoc (this is a customized IDOC , if i triger IDOC for multiple vendors then it triggers only 1 idoc with multiple segment )
    Receiver side:
    DT_testVendor
        Table
            tblVendor
                action UPDATE_INSERT
                access                     1:unbounded
                    cVendorName         1
                    cVendorCode        1
                    fromdate                1
                    todate                    1
                 Key1
                    cVendorName         1
    if i trigger idoc for multiple vendors ,for example vendor 2005,2006 and 2010 . then i can see that the only key comes from the very first field (2005) and the whole record for vendor 2005,2006 and 2010  goes into the table with this(2005) as a primary key
    now again if i send data for these three vendor 2005, 2006 , 2010, in which record for the vendor 2005 is same and for 2006 and 2010 are different than it takes 2005 as a primary key and it does not update the data in the table.
    my requirement is like this:   for each vendor there should be one unique key assigned.
                                              for above said example there should come three keys one for each vendor .
    could you please help me how to do this???????????

    Hi,
      In Mapping Make the statement is 0-unbounded.For each vendor create a statement.This will solve your problem.
    Regards,
    Prakasu.M

  • Spool creation for each vendor/ payment document in program RFFOUS_C

    Hi experts,
    Requirement is to create spool for each vendor/payment document in RFFOUS_C.
    What is presently happening is only one spool is created for all the payment document numbers.
    I need to create separate spool for each cheque and remittance advice based on the payment document.
    Ex:I have 2 vendors with one cheque and remittance advice each.The first cheque and remittance advice of vendor 1 should be created in spool 1 and the second cheque and remittance advice of vendor 2 should be created in spool 2.
    Please suggest your inputs as to what needs to be changed in the program RFFOUS_C or do we need some configuration to achieve the same.
    Regards,
    Joby

    HI,
    Try to see if the check is register on FCHN transaction. So, you will be able to reprint the check using FHC7 transaction.
    Let me know your comments
    Daniel

  • Return to vendor via delivery, customer number for each vendor?

    Hi
    We wish to use return materials to Vendor via delivery process
    addition to required configuration, we need to maintain Customer number in Vendor master
    In out plant we have more than 500 Vendor masters, do we need to create customer number for each vendor? or can we create a generic customer ????
    Business has a concern on creating customer for each vendor since number is huge, Sales guys may get confused with these numbers
    Please suggest a way out
    Thanks

    Thanks Jurgen for the reply
    We have Vendor Work flow setup in the system. Which means when ever vendor master is changed [Return indicator ticked] workflow kicks off which means it goes for approvals. This is why we dont want to go for tick as and when needed. When ever there is a return, return to vendor must be ticked, it will go for approval etc so it slows the process
    we are thinking if we can achieve through data load before SAP GO-Live so that users able to return without any delay
    NOTE 447070 says 'the automatic creation of the required customer data is not supported in the data transfer'
    this is related to automatic customer create isnt it
    i was thinking as below
    --> Create Ship-to's for all vendors
    --> Load vendors via LSMW [along with return to vendor ticked and customer number(created above)]
    Tested in SAP
    created ship-to
    Created vendor with above customer number
    Do you see any issue?
    Thanks

  • Create  of (demo for)OVAI (transaction for create entries for each vendor)

    hi all,
    can anyone plz tell me how 2 create (demo for)OVAI (transaction for create entries for each vendor)
    thans & regards,
    srinivas reddy.

    hiii
    yes you can call transaction like that..take tcode in that parameter then you can use it in your program with statement like
    call transaction (variable)..in background process.
    regards
    twinkal

  • Any tables for  each vendor/customer to check foreign currency balance?

    Hi all,
    Does SAP provide any tables to check foreign currency balance for each vendor/customer?
    I have searched some websites, have not found any good solutions yet?
    Regards
    Tony
    Moderator: Please, search SDN

    Hi ,
    please use the report  tcode S_ALR_87012172 . Kindly award points if the answer was helpful.
    Regards
    Anirban

  • Purchase Order for one Vendor & one ship name.

    How to display all Purchase orders for one vendor and one ship name.
    Its urgent...
    Regards
    Irfan

    What is one ship name? is it Delivery Address..
    Then try ME2N....
    You can choose different fields like Vendor etc...
    in the Dynamic selections....
    Thx
    Raju

  • Updating multiple bank details for each vendor, through LSMW

    Hi,
    We need to do a massive update on our vendors bank details, and I'm trying to do it via LSMW. I have two problems.
    Each vendor may have several bank accounts. In XK02 they appear in a list, and in LSMW the bank detail fields are inside arrays (for example the bank key on first line would be LFBK-BANKL(0)), but I don't know on what lines are stored the banks I want to update. Is it possible to determine the index n° of the array (line number) just by reading the table LFBK ? I can't go into XK03 for every vendor to check at which line the bank details are stored.
    Second, I don't know how to update a different line each time with a single batch input recording. When I record a LSMW batch input, I have to chose a specific field to update, which includes the line n°. How can I specify the line n° as a variable part of the data? Or alternatively, I could record the batch input to update enough lines for each vendor (say 5) and only provide data for the the lines to be updated, but I assume the lines without data would get deleted when the batch is run?
    Please help.

    Dear John;
    You may create your LSMW with a vendor which has n banks (say 5). You will write 5 rows of bank info. LSMW will create new field names for these areas. 01-02...
    LFBK-BANKS(01)                 TR
    LFBK-BANKS(02)                 tr
    LFBK-BANKL(01)                 0067-00002
    LFBK-BANKL(02)                 0067-00003
    LFBK-BANKN(01)                 1234
    LFBK-BANKN(02)                 1235
    you will prepare your excel for this purposes after then.
    I hope it will help.
    BR.
    Aydın

  • Internal order for DC

    Hi,
    We want to create an internal order for a project we are going to start in one of the Distribution centers. Since the DC is not associated with a plant, can we create an internal order exclusively for the DC? I created a new order type and in the field selection I hide Plant and set the location field required. However, when I was creating a new Internal order it says location/plant. If internal order can be created only for plant then how can we track the activities of the work done in a DC? Please share your ideas.
    Thanks

    Hi
    The Location field used by you seems to be related to a Location in a Plant and hence the dependency of the Plant.
    You can hide this Location field and  use some other Text field for Keying in values pertaining to Location ( As per your requirement).
    Harsh

  • Internal order for AUC with cost center - 'Please Select proper plant code'

    Hi All,
    User is getting error 'Please Select proper plant code', while inserting 'cost center' in field 'Responsible CCtr' for new Internal order which is for AUC.
    In Devlopment server also when we try to create asset through internal order we get same error.
    For your information this is new Plant, profit center and cost center for which we are trying to create internal order for AUC.
    If we try to post without Cost centre entry is saved. But we want to add cost center.
    Please help to resolve.

    Hi,
    If it is a custom message then please check whether any Validation or USer exit is maintained for the IO master data. If yes, then update the cost centre accordingly.
    Regards
    Sreekanth

  • Internal Order for prepaid events

    While posting internal order for prepaid events, the system is forcing to enter Investment Profile. That should be the case if it is an investment measure ut this internal order is for recording short term events that get prepaid. How to make this  field "Investment Profile" under Investment tab optional from required.

    Is it at the time of creation of Internal order master data or at the time of posting entries to the Internal Order?
    Can you explain in detail?

Maybe you are looking for

  • Error while transporting structure

    Hi I have tried to move a structure CI_FAGLFLEX04 from development to quality. But I am getting a transport error as follows.. Table CI_FAGLFLEX04 could not be activated (E- Nametab for table CI_FAGLFLEX04 cannot be generated ) This structure is used

  • Vendor Master Data Event

    Hello during vendor master data creation and when the user attempts to save data, I need to make IBAN mandatory per country X, could you please assist me where I should do the validation? In the vendor master data user exist, IBAN data is not coming

  • Flash based photo galleries won't play

    Photos on my website have stopped working, The website was built using NetObjects Fusion XII on Windows 7 (64 bit) and the photo galleries use shockwaveflash. I have checked the addons and plugins and everything is up to date. I have re-installed fla

  • Is it possible in calculate this in BEx.......

    Hi Guys, This is a bit of a strange requirement but a requirement nonetheless, and im curious to know if it can be done without an ABAP person being involved. The scenario: We have a BW Query that is reporting data on a Project level. Say for example

  • Very strange syncing problem

    My syncing has not been working properly for a few days - mainly events from iphone not appearing on iCal on my iMac. This morning the problem got much weirder. I entered an event in iCal - a meeting for 9.00am. I then had the meeting confirmed for l