Create a Link between Work Order and Reapir Order

IREAPIRORDER is the reapir order(IW54)
AUFNR is the work order (IW31)
w_relation = 'VONA'.
fs_obj_rolea-objtype = 'BUS2032'.
fs_obj_rolea-objkey = REAPIRORDER.
fs_obj_roleb-objtype = 'BUS2007'.
fs_obj_roleb-objkey = AUFNR.
CALL FUNCTION 'BINARY_RELATION_CREATE_COMMIT'
EXPORTING
obj_rolea = fs_obj_rolea
obj_roleb = fs_obj_roleb
relationtype = w_relation
IMPORTING
binrel = fs_binrel
TABLES
BINREL_ATTRIB =
EXCEPTIONS
no_model = 1
internal_error = 2
unknown = 3
OTHERS = 4.
CALL FUNCTION 'BINARY_RELATION_CREATE_COMMIT'
EXPORTING
obj_rolea = fs_obj_roleb
obj_roleb = fs_obj_rolea
relationtype = w_relation
IMPORTING
binrel = fs_binrel
TABLES
BINREL_ATTRIB =
EXCEPTIONS
no_model = 1
internal_error = 2
unknown = 3
OTHERS = 4.
The link is not getting created

Please go through this link:
/people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background
Please give me reward points
Thanks
Murali Poli

Similar Messages

  • API to create a link between Sales order and Requisition

    We are upgrade 11i to R12. We have a custom drop ship process. We have a original SO and through the sales order we create a Reqisition. We send the requisition details to the factory and the factory sends us a flat file with the quantity shipped and dates. There might be multiple lines for each requisition received. We will add the details to the SO and update the Requision with the flat file details for the SO shipment. But We will have to create a link between the SO and the requisition. Is there an API to do the linking between a SO and A requisition line?

    I created a SO and a requisition
    declare
    p_rsv inv_reservation_global.mtl_reservation_rec_type;
    p_dummy_sn inv_reservation_global.serial_number_tbl_type;
    x_msg_count NUMBER;
    x_msg_data VARCHAR2(240);
    x_rsv_id NUMBER;
    x_dummy_sn inv_reservation_global.serial_number_tbl_type;
    x_status VARCHAR2(1);
    x_qty NUMBER;
    l_inventory_item_id number;
    l_source_header_id number;
    l_reservation_qty number;
    l_error_message VARCHAR2(300);
    l_order_number NUMBER;
    begin
    fnd_global.APPS_Initialize(1131,50654,660);
    p_rsv.reservation_id := NULL;
    p_rsv.requirement_date := to_date('30-JUN-2012','DD-MON-YYYY');
    p_rsv.organization_id := 88; ---ship_from_org_id
    p_rsv.inventory_item_id := 147001; --inventory_item_id
    p_rsv.demand_source_type_id := inv_reservation_global.g_source_type_oe;
    p_rsv.demand_source_name := NULL;-------'SALES ORDER';
    p_rsv.demand_source_header_id := 27005; --- sales order header id
    p_rsv.demand_source_line_id := 29010; --- sales order line id
    p_rsv.primary_uom_code := 'EA';
    p_rsv.primary_uom_id := NULL;
    p_rsv.reservation_uom_code := 'EA';
    p_rsv.reservation_uom_id := NULL;
    p_rsv.reservation_quantity := 200;
    p_rsv.primary_reservation_quantity := 200;
    ----p_rsv.supply_source_type_id := inv_reservation_global.g_source_type_internal_req;
    p_rsv.supply_source_type_id :=inv_reservation_global.g_source_type_inv;
    p_rsv.supply_source_header_id :=18001; -- requisition header id
    p_rsv.supply_source_line_id :=12172; -- requisition line id
    p_rsv.supply_source_name := NULL;
    p_rsv.supply_source_line_detail := NULL;
    p_rsv.autodetail_group_id := NULL;
    p_rsv.external_source_code := NULL;
    p_rsv.external_source_line_id := NULL;
    p_rsv.supply_source_line_detail := NULL;
    p_rsv.revision := NULL;
    p_rsv.subinventory_code := NULL;
    p_rsv.subinventory_id := NULL;
    p_rsv.locator_id := NULL;
    p_rsv.lot_number := NULL;
    p_rsv.lot_number_id := NULL;
    p_rsv.pick_slip_number := NULL;
    p_rsv.lpn_id := NULL;
    p_rsv.attribute_category := NULL;
    p_rsv.ship_ready_flag := NULL;
    p_rsv.demand_source_delivery := NULL;
    p_rsv.attribute1 := NULL;
    p_rsv.attribute2 := NULL;
    p_rsv.attribute3 := NULL;
    p_rsv.attribute4 := NULL;
    p_rsv.attribute5 := NULL;
    p_rsv.attribute6 := NULL;
    p_rsv.attribute7 := NULL;
    p_rsv.attribute8 := NULL;
    p_rsv.attribute9 := NULL;
    p_rsv.attribute10 := NULL;
    p_rsv.attribute11 := NULL;
    p_rsv.attribute12 := NULL;
    p_rsv.attribute13 := NULL;
    p_rsv.attribute14 := NULL;
    p_rsv.attribute15 := NULL;
    inv_reservation_pub.create_reservation
    p_api_version_number => 1.0
    , x_return_status => x_status
    , x_msg_count => x_msg_count
    , x_msg_data => x_msg_data
    , p_rsv_rec => p_rsv
    , p_serial_number => p_dummy_sn
    , x_serial_number => x_dummy_sn
    , x_quantity_reserved => x_qty
    , x_reservation_id => x_rsv_id
    IF x_status='S' THEN --- HARD RESERVATION IS DONE SUCCESFULLY ---
    dbms_output.put_line('reservation succesful');
    dbms_output.put_line('reservation id: || x_rsv_id');
    ELSE
    if(nvl(x_msg_count,0) = 0) then
    dbms_output.put_line('no message return');
    else
    for I in 1..x_msg_count LOOP
    l_error_message := fnd_msg_pub.get(I, 'F');
    end LOOP;
    end if;
    --- HARD RESERVATION API fails ---
    dbms_output.put_line('Reservation API Error Message: '||l_error_message);
    END IF;
    EXCEPTION
    WHEN OTHERS THEN ------------------ In case of any pl/sql error
    l_error_message := SQLERRM;
    dbms_output.put_line('Plsql Error Message: '||l_error_message);
    END;
    but i am getting an error
    "Reservation API Error Message: INV_RSV_DS_SO"
    I am stuck and no idea how to fix this. Any help is appreciated.
    Edited by: 901524 on May 23, 2012 1:26 PM

  • How to create database link between oracle9i database and oracle10g

    How to create database link between oracle9i database and oracle10g
    oracle9i database name "Prod" windows server 2003 ( 172.x.x.x)
    oracle10g database name "TEST" sun solaris 9 (165.x.x.x.x)
    Please help me on this

    For connections between 10.2 and 9.2 the 9.2 end MUST be at 9.2.0.4 or higher. Connections between 10.2 and 9.2.0.1, 9.2.0.2 or 9.2.0.3 are not supported.
    Connections between 10.2 and 9.0.1 was never been supported.
    Cheers !!!!
    Bhupinder

  • Link between work center and G/L Account

    Hi All,
    I need to link work center to the G/L account in PM Module . I know the link between work center and cost center . But would like to know how MO cost hits which cost element/ G/l account and there assignment
    Thanks and Regards,
    Vivek

    Hi check the below definitions
    Cost centre : Organizational unit within a controlling area that represents a defined
    location of cost incurrence.
    Profit Centre: Organizational unit in Accounting that reflects a management-oriented
    structure of the organization for the purpose of internal control.
    Work Centre: An organizational unit that defines where and when an operation should
    be carried out.
    Regards
    Sreeni

  • Link between structure indicator and labellig system (PM-FL)

    Hello,
    I'm facing a problem to associate one of my alternative label with a precise structure indicator.
    In our system (R/3 4.6c), we have activated the alternative system in order to use a 40-char-long label for our functional locations. We also created a structure indicator to represent these 40 characters.
    When changing this alternatice label, the system shows the structure indicator of the main label. On my opinion, it is normal because I've found no customizing point that allows me to link the alternative labelling and the structure indicator. Am I wrong?
    If you ever encountered this problem, could you please help me find a way to solve it?
    Best regards,
    Annabelle

    Hello,
    sorry I couldn't answer your question sooner.
    The situation is this one :
    - functional locations have assigned  primary labels. These labels are created according 43 (out of 44) structure-indicators which help in representing a structure of technical objects. Thanks to the object type, we created a link between object type and structure indicator through a specific table.
    - Two functional locations can have the same ID with distinct localisations.
    - a secondary label has been created in order to generate a 40-character-long ID that is necessary to have a unique ID for each functional location.
    - We have a specific structure indicator (the 44th) that represents a 40-character-long text.
    As both labels are mandatory in the solution, is there a customizing point where we can link a non-primary label with a defined structure-indicator?
    Thanks for your help.
    Annabelle

  • Regarding creating a LOOSE LINK between Sales Order and Vehicle

    Hi,
    Does anyone has any idea on how to establish a LOOSE LINK between Sales Order and Vehicle using BAPI_VEHICLE_CREATE or any other Function module.
    Any help will be highly appreciated and rewarded.
    Kind Regards,
    Tanuja

    Dear Kumar,
    Strategy - 40
    Consumption of PIR (not Redution)
    1) the first point in strategy in 40 is, incoming sales order consumes PIR
    2 )both sales order and PIR takes place in MRP planning run
    2) this is where it is in mostly used in many indutries
    just a small example how this strategy works
    1) creat PIR for ur FERT- 100Nos
    2) check in MD04- u will get PIR (VSF) as 100
    3) now creat sales order for 120 for same month
    4 )run MRP for that particular FERT
    5) check the result in MD04, here ur PIR gets vanishied and an plan order will be generated for 120 Nos.
    Regards
    kumar
    Edited by: kumar kumar on Jul 22, 2009 8:29 AM

  • Link Between Service Notification and Sales Order

    Hi All,
    In our business process, we will create sales order from Service Notification and we can see the same in the Document flow. But when i check in the VBFA table, there are no entries. I would like to know how the document flow is updated without updating the VBFA Table or is there any other table gets updated for this flow.
    Please guide me.
    With Regards
    Vinu.N

    Hello Vinu
    For one Sales Order # figures in Notification header table- VIQMEL-VBELN.
    Similarly Notification # figures in Sales Order Header table- VBAK-QMNUM
    That is a solid link right there.
    I Also guess technical objects like Equipment, Serial number also form link between the Sales and Service Documents.
    Also check out the logic in document flow program RIBELF20, may be it will give you the clues to the problem.
    Hope this helps.

  • Link between process order and sales order for planning strategy 52

    Hello,
    I investigate the possibility of a link between "sales order" and "planned order / process order" for the usage of planning strategy 52 (planning w/o final assembly, make to stock).
    I know, this is not conform to the basics of planning strategies (EITHER make to order OR make to stock) and I suspect it would be a modification. Of course we have the alternative "make to order" - strategy 50, but we do not want to use individual customer stocks.
    Is anybody there with similar customer requirements or project experiences?
    Thanks in advance,
    Joerg
    Message was edited by:
            Jörg Demtschuk

    Hi Jorg,
    To my understanding if you need hard pegging then in SAP only Individual requirement is possible.
    Or else you need to create a custom transactions/table to identify Sale order and when ever a process order is created by selecting the sale order record, the process order detials should also get updated against that.
    You need to take the help of ABAP expert for this,
    Regards,
    Prasobh
    Reward points if this was useful

  • Link between Purchase order and Attachment list

    Hi All,
    I got a requirement like Purchase orders are from moved from one system to another system.There was a bug in BDC program
    so some Attachment list of the purchase orders are not moved properly to the another system.
                                                   Now my client want a report to generate the Purchase orders which is having attachment list.
    I did not find any table link between Purcahase order and Attachment list.
                                                  So Plz provide me the link between purchase order and attachment list.
    Thanks,
    Ram

    You mean service for object services?
    if yes then u have to create one custom report for Generic Object Services   ( like notes , attachment  , url )

  • Link between notification number and meter reading order in ISU

    what is the link between notification number and meter reading order in ISU. i have written a program to close all open notifications but now i want the program to close only notifications with closed meter reading orders but i cant find the link between meter  reading order and notification

    HI timothy
    you can tell me how do you solved this issue?
    how i can match reading Order with the order in Work Management?
    i need some configuration?
    thanks in advance
    Miguel

  • Link between Sales order and Credit master sheet

    Hi,
    Plz explain the link between sales order and credit master sheet.
    Thanks and regards
    CSR

    Hi,
    Credit master is related to Customer.
    Credit limit will be assigned to a customer by using the T.Code FD32.
    Credit control area will be assigned to a customer.
    You can the credit control area for a customer in the table "KNVV".
    Goto the T.Code "FD32".Enter your customer number and credit control area.Select the status tab.
    Here you can maintain the credit limit.If you leave blank means the limit is 0.00.
    Next thing is goto the T.Code "OVAK".
    Select your sales order.Maintain the "Credit limit check" for your order type.
    Goto the T.Code "OVA8".Select your valid combination.Here,you can activate either the static or dynamic credit limit checks.
    If you create the sales order by using the customer,initially the system will check for the credit limit.If it is 0.00 and credit check functionality is activatd in the above specified T.Codes,then creditcheck will happen and order will be blocked for releasing of credit by using the T.Code "VKM3".Authorised persons have to release this credit block.Suppose,you have maintained this credit limit as "1000Rs/-" and you are creating the order of value "550Rs/-",then your order will not be blocked even though the credit check functionality is activated for your order type.
    In this way,sales order is in turn related to credit master.
    Regards,
    Krishna.

  • How can i create link between ipad(xcode) and webserver?

    Hi, I'm a new to iPad development and i need help,
    i'm not good with english but i try to explain my question:
    how can i create link between ipad(xcode) and webserver?
    (the webserver ".NET" with driver odbc is connected with DB Oracle)
    so, how can my ipad application access to the Oracle DB?
    Create a webservice (.NET) to be place between iPad and DB, is this correct?
    how can i do it?
    which are libraries to include in the xcode's framework?
    thx

    I think the following URL will be your best answer:
    http://stackoverflow.com/questions/3510468/connecting-iphone-to-an-odbc-database

  • Create DB link between my local system and remote system

    Hi,
    I need help to create DB link between my local system Database and remote system database both the database are oracle.
    Please check the script which i have written is correct or not. Its giving me error sql command not ended properly
    create public database link MERU_PROD_LOCAL_PROD
    CONNECT TO SUDHIR
    identified by sudhir123
    using (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS =
    (COMMUNITY = tcp.world)
    (PROTOCOL = TCP)
    (Host = 23.23.150.144)
    (Port = 1521)
    (CONNECT_DATA = (SERVICE_NAME = sudhir)
    I am executing this command in my local system connecting to the remote database link. Please suggest me is this method correct.
    Thanks
    Sudhir

    Hi Hilton,
    I fixed that issue. Now i am creating the DB link this ways please check is this proper or not
    create or replace database link meru_prod_local_prod connect to portal identified by Oracle!123 using 'MERUPROD';
    remote machine
    User Name: portal
    Password : Oracle!123
    MERUPROD is the tnsora entry
    It gives error as
    Error starting at line 1 in command:
    create or replace database link meru_prod_local_prod connect to portal identified by Oracle!123 using 'MERUPROD'
    Error at Command Line:1 Column:18
    Error report:
    SQL Error: ORA-00922: missing or invalid option
    00922. 00000 - "missing or invalid option"
    *Cause:   
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Link between maintainance order reservation and pur requisition

    Dear Experts,
    I need link between maintainance order reservation number against a materials and purchase requisition raised against it.
    Basically requirement is that i need a report in which i can c the purchase requisition against the materials of maintanace order..
    Please help me out
    Regards,
    Vishal

    hey somebuddy will plz help me out ...

  • How to create database link between oracle and SQL Server

    Hello Everyone,
    Here i have Oracle Database 9i and SQL Server 2005 databases.
    I have some tables in sql server db and i want to access from Oracle.
    How to create a database link between these two servers
    Thanks,

    Thanks for Everyone,
    I was struggle with this almost 10 days....
    I created Database link from Oracle to SQL Server
    Now it is fine.........
    Here i am giving my servers configuration and proceedure how i created the db link...@
    Using Generic Connectivity (HSODBC) we can create db link between Oracle and SQL server.
    Machine (1)
    DB Version : Oracle 9.2.0.7.0
    Operating System : HP-UX Itanuim 64 11.23
    IP : 192.168.0.31
    Host : abcdbt
    Machine (2)
    Version : SQL Server 2005
    Operating System : Windows server 2003 x86
    IP : 192.168.0.175
    Host : SQLDEV1
    User/PW : sa/abc@123! (Connect to database)
    Database : SQLTEST (exsisting)
    Table : T (“ T “ is the table existing in SQLTEST database with 10 rows)
    Prerequisites in Machine (2):
    a)     Oracle 10g software
    b)     User account to access SQL Server database (sa/abc@123!)
    c)     Existing SQL Server Database (SQLTEST)
    d) Tables (testing purpose) (T)
    Steps:
    1)     Install Oracle 10.2.0.1 (Only SW,No need of database) *(Machine 2)*
    2)     Create a DSN where your windows Oracle 10g SW resides *(Machine 2)*
    Control panel >> Administrative Tools >> Data Source (ODBC) >> System DSN ADD
    You can follow this link also.....
    http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
    I created DSN as
    DSN name : SQLTEST
    User : SA/abc@123! (Existing user account)
    Host : 192.168.0.175 (machine 2)
    Already I have 1 database in SQL Server with the name SQLTEST
    You can create DSN with different name also (not same as db name also)
    3)     Create a hsodbc init file in $ORACLE_HOME\hs\admin *(Machine 2)*
    Create init<DSN NAME> file
    Ex: initSQLTEST
    Copy inithsodbc to initSQLTEST
    And edit
    initSQLTEST file
    HS_FDS_CONNECT_INFO = SQLTEST    <DSN NAME>*
    HS_FDS_TRACE_LEVEL = OFF*
    save the file....@
    4)     Configure Listener.ora *(Machine 2)*
    LISTENER_NEW =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
    SID_LIST_LISTENER_NEW =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = SQLTEST) *+< Here SQLTEST is DSN NAME >+*
    (ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
    (PROGRAM = hsodbc))
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
    (PROGRAM = extproc) )
    :> lsnrctl start LISTENER_NEW
    5)     Configure tnsname.ora *(Machine 2)*
    SQLTEST11 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = SQLTEST))
    (HS=OK)
    :> tnsping SQLTEST11
    If No errors then conti….
    6)     Configure a file *(Machine 1)*
    Cd $TNS_ADMIN ($ORACLE_HOME/network/admin)
    Create a file
    $ vi TEST_abcdbt_ifile.ora
    something=
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST =192.168.0.175) (PORT=1525))
    (CONNECT_DATA=
    (SID=SQLTEST))
    (HS=OK)
    $ tnsping something
    $ sqlplus system/manager
    Your connected to Oracle database *(machine 1)*
    create database link xyz connect to “sa” identified by “abc@123!” using ‘SOMETHING’;
    select * from t@xyz;10 rows selected.
    Thanks,
    Edited by: ram5424 on Feb 10, 2010 7:24 PM

Maybe you are looking for

  • Adobe Acrobat 8 how to delete it completely?

    I have to deactviate Adobe CS3 from my old computer to reinstal into my new computer. Now I have a problem downloading Adobe Reader on my old computer as Adobe Acrobat is still there after I delete the Adobe CS3. Can someone show me how to remove Acr

  • Will not display on most monitors.. very frustrating..

    I purchased my MBA a couple weeks ago and have successfully been able to connect 1 monitor (over VGA). I have tried two projectors (neither will work, although it will detect both of them) and it will not connect to my Viewsonic at home (both my othe

  • HDDVD authoring

    hi iam a newbie to HDDVD authoring in DVDSP, i planned to buy a new macpro and aja or decklink card for capturing the HD content, pls explain me the process involved in making the source for HDDVD. i have my HD source in D5 and also suggest a good HD

  • Additive costs and LSMW

    Hi , I have LSMW for Additive cost upload, but unfortunately we have additive cost for all materilas  valid up to 9999 year so when ever we use LSMW for upload we need to hit (as it gives that screen showing previous additive cost estimate as it over

  • Is there a USB2 hub that can be connected on FW port?

    Since there is a USB2 and FW hub for Mac Mini, which as far as I am aware connects on USB2 port (or maybe requires two feeds?), I am curious to know if the above exists. This would solve my problems of lack of USB ports on iMac and use the FW port I