Creation of routing using BAPI_ROUTING_CREATE

Hi,
I need to create routing using BAPI. I am using BAPI_ROUTING_CREATE. My routing is not saved. I am using BAPI_TRANSACTION_COMMIT  also when message type is 'S', after Routing is created. But Still my routing is not saved. I can see successfull message as N/50003801/01 is created .
I already spent lot of time on this, and gone thru coding available in google search, still no use. I debug BAPI couple if timings but didnot find anything.
I even tried using SE37 directly by Sequence execution of both BAPI_ROUTING_CREATE & BAPI_TRANSACTION_COMMIT, no use. i tried different combinations like by giving input values to INPUT PARAMETERS OF BAPI_ROUTING_CREATE giving BOM usage, without BOM usage, TESTRUN value as 'X' and as SPACE.
I even gone thru this Func. Module /SAPMP/BAPI_ROUTING_PROCESS which directly calls BAPI_ROUTING_CREATE inside it, but no use. I see many people is giving solution as BAPI_TRANSACTION_COMMIT, but I really think that is not problem.
Does any one have any idea on this issue.
Thanks in Advance

Hi Cthota,
Indeed, TESTRUN must be equal to space. And BAPI_TRANSACTION_COMMIT is needed, as stated in the doc's.
Could you please check all messages in RETURN table? Very likely there is something not correct in the parameters, that do not prevent the system to assign routing numbering, but that may affect saving.
Just let us known...
Bye,
flavio

Similar Messages

  • Problem while creation of Routing using BAPI "BAPI_ROUTING_CREATE"

    Hi.
    I am trying to create routing using the BAPI "BAPI_ROUTING_CREATE", when I execute I get the group number and the group counter number in the Export parameters. But it is not saved in the database, when we look at CA03 using the group number system says routing not found.
    I am passing "Space" to Bapiflag and i am passing input to tables TASK, MATERIAL ALLOCATON and OPERATION as follows:-
    MATERIALTASKALLOCATION-MATERIAL
    MATERIALTASKALLOCATION-PLANT
    TASK-TASK_LIST_USAGE
    TASK-PLANT
    TASK-TASK_LIST_STATUS
    TASK-TASK_MEASURE_UNIT
    OPERATION-ACTIVITY
    OPERATION-CONTROL_KEY
    OPERATION-WORK_CNTR                    
    OPERATION-PLANT
    OPERATION-DESCRIPTION
    OPERATION-NUMERATOR
    OPERATION-DENOMENATOR
    OPERATION-BASE_QUANTITY
    OPERATION-STD_UNIT_01
    OPERATION-STD_VALUE_01
    OPERATION-STD_UNIT_02
    OPERATION-STD_VALUE_02
    OPERATION-STD_UNIT_03
    OPERATION-STD_VALUE_03
    OPERATION-STD_UNIT_04
    OPERATION-STD_VALUE_04
    OPERATION-STD_UNIT_05
    OPERATION-STD_VALUE_05
    OPERATION-STD_UNIT_06
    OPERATION-STD_VALUE_06
    Appreciate your replies.
    Regards.
    Anand Ghawade.

    Use BAPI_TRANSACTION_COMMIT after you call the BAPI_ROUTING_CREATE

  • Using BAPI_ROUTING_CREATE to copy routing from legacy system

    Hi,
    I would like to know whether its possible to use BAPI_ROUTING_CREATE in my Routing conversion program to upload all routing data from the legacy system into SAP?
    It's kind of urgent.
    Thanks in advance

    Well actually that´s almost exactly what my task is as well.
    So what i do is:
    - reading the headdata of the given routing (the one which is to be copied)
    - reading the positiondata of the given routing (the one which is to be copied)
    then calling the BAPI_ROUTING_CREATE while exporting the headdata and the positiondata to the BAPI.
    It works perfect for the routing itself, but the BAPI doesnt create any operations while it displays a sucess message and NO errormessages.

  • Problem with creation of routing

    Dear All,
    I use below BAPI for creation of routing. BAPI is succeddful but when i go to CS03 and display, work center, plant, control key information is not filled.  But header details are filled. Do you have any idea why it happens ? Am i not filling some parameters ?
    Please let me know.
    CLEAR : LR_BAPIRET2,
          LT_BAPIRET2.
    CLEAR LT_TASK.
    LR_TASK-VALID_FROM = SY-DATUM.
    LR_TASK-VALID_TO_DATE = '99991231'.
    LR_TASK-TASK_LIST_USAGE = '1'.
    LR_TASK-PLANT = '1830'.
    LR_TASK-TASK_LIST_STATUS = '4'.
    LR_TASK-TASK_MEASURE_UNIT = 'PC'.
    LR_TASK-DESCRIPTION = 'TEST1'.
    LR_TASK-LOT_SIZE_FROM = '0.000'.
    LR_TASK-LOT_SIZE_TO = '0.000'.
    APPEND LR_TASK TO LT_TASK.
    CLEAR : LR_MATERIALTASKALLOCATION,
          LT_MATERIALTASKALLOCATION.
    LR_MATERIALTASKALLOCATION-MATERIAL = 'TEST-0008'.
    LR_MATERIALTASKALLOCATION-PLANT = '1830'.
    LR_MATERIALTASKALLOCATION-VALID_FROM = SY-DATUM.
    APPEND LR_MATERIALTASKALLOCATION TO LT_MATERIALTASKALLOCATION.
    CLEAR : LR_OPERATION,
          LT_OPERATION.
    LR_OPERATION-WORK_CNTR = 'HCPA001'.
    LR_OPERATION-PLANT = '1830'.
    LR_OPERATION-CONTROL_KEY = 'PP01'.
    LR_OPERATION-BASE_QUANTITY = '1.000'.
    LR_OPERATION-VALID_FROM = SY-DATUM.
    LR_OPERATION-SEQUENCE_NO = '0'.
    LR_OPERATION-OBJ_ID = '00000000'.
    *LR_OPERATION-ACTIVITY = '0010'.
    LR_OPERATION-DESCRIPTION = 'TEST'.
    APPEND LR_OPERATION TO LT_OPERATION.
    CALL FUNCTION 'BAPI_ROUTING_CREATE'
    EXPORTING
      TESTRUN                      = ' '
      PROFILE                      =
      BOMUSAGE                     = 'X'
      APPLICATION                  =
    IMPORTING
      GROUP                        =
      GROUPCOUNTER                 =
      TABLES
        TASK                         = LT_TASK
        MATERIALTASKALLOCATION       = LT_MATERIALTASKALLOCATION
        SEQUENCE                     = LT_SEQUENCE
        OPERATION                    = LT_OPERATION
      SUBOPERATION                 =
      REFERENCEOPERATION           =
      WORKCENTERREFERENCE          =
      COMPONENTALLOCATION          =
      PRODUCTIONRESOURCE           =
      INSPCHARACTERISTIC           =
      TEXTALLOCATION               =
      TEXT                         =
        RETURN                       = LT_BAPIRET2
    LOOP AT LT_BAPIRET2 INTO LR_BAPIRET2 WHERE TYPE = 'E' OR
                                           TYPE = 'A'.
      LF_ROUTING_ERROR = 'X'.
    ENDLOOP.
    IF LF_ROUTING_ERROR NE 'X'.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            WAIT          =
          IMPORTING
            RETURN        =
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
        IMPORTING
          RETURN        =
    ENDIF.

    Sorry.
    CLEAR : LR_BAPIRET2,
          LT_BAPIRET2.
    CLEAR LT_TASK.
    LR_TASK-VALID_FROM = SY-DATUM.
    LR_TASK-VALID_TO_DATE = '99991231'.
    LR_TASK-TASK_LIST_USAGE = '1'.
    LR_TASK-PLANT = '1830'.
    LR_TASK-TASK_LIST_STATUS = '4'.
    LR_TASK-TASK_MEASURE_UNIT = 'PC'.
    LR_TASK-DESCRIPTION = 'TEST1'.
    LR_TASK-LOT_SIZE_FROM = '0.000'.
    LR_TASK-LOT_SIZE_TO = '0.000'.
    APPEND LR_TASK TO LT_TASK.
    CLEAR : LR_MATERIALTASKALLOCATION,
          LT_MATERIALTASKALLOCATION.
    LR_MATERIALTASKALLOCATION-MATERIAL = 'TEST-0008'.
    LR_MATERIALTASKALLOCATION-PLANT = '1830'.
    LR_MATERIALTASKALLOCATION-VALID_FROM = SY-DATUM.
    APPEND LR_MATERIALTASKALLOCATION TO LT_MATERIALTASKALLOCATION.
    *CLEAR : LR_SEQUENCE,
    *      LT_SEQUENCE.
    *LR_SEQUENCE-SEQUENCE_NO = '0'.
    *LR_SEQUENCE-SEQUENCE_CATEGORY = '0'.
    *LR_SEQUENCE-ALIGNMENT_KEY_FOR_SCHEDULING = '2'.
    *APPEND LR_SEQUENCE TO LT_SEQUENCE.
    CLEAR : LR_OPERATION,
          LT_OPERATION.
    LR_OPERATION-WORK_CNTR = 'HCPA001'.
    LR_OPERATION-PLANT = '1830'.
    LR_OPERATION-CONTROL_KEY = 'PP01'.
    LR_OPERATION-BASE_QUANTITY = '1.000'.
    LR_OPERATION-VALID_FROM = SY-DATUM.
    LR_OPERATION-SEQUENCE_NO = '0'.
    LR_OPERATION-OBJ_ID = '00000000'.
    *LR_OPERATION-ACTIVITY = '0010'.
    LR_OPERATION-DESCRIPTION = 'TEST'.
    APPEND LR_OPERATION TO LT_OPERATION.
    CALL FUNCTION 'BAPI_ROUTING_CREATE'
    *  EXPORTING
    *   TESTRUN                      = ' '
    *   PROFILE                      =
    *   BOMUSAGE                     = 'X'
    *   APPLICATION                  =
    * IMPORTING
    *   GROUP                        =
    *   GROUPCOUNTER                 =
      TABLES
        TASK                         = LT_TASK
        MATERIALTASKALLOCATION       = LT_MATERIALTASKALLOCATION
        SEQUENCE                     = LT_SEQUENCE
        OPERATION                    = LT_OPERATION
    *   SUBOPERATION                 =
    *   REFERENCEOPERATION           =
    *   WORKCENTERREFERENCE          =
    *   COMPONENTALLOCATION          =
    *   PRODUCTIONRESOURCE           =
    *   INSPCHARACTERISTIC           =
    *   TEXTALLOCATION               =
    *   TEXT                         =
        RETURN                       = LT_BAPIRET2
    LOOP AT LT_BAPIRET2 INTO LR_BAPIRET2 WHERE TYPE = 'E' OR
                                           TYPE = 'A'.
      LF_ROUTING_ERROR = 'X'.
    ENDLOOP.
    IF LF_ROUTING_ERROR NE 'X'.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *       EXPORTING
    *         WAIT          =
    *       IMPORTING
    *         RETURN        =
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
    *     IMPORTING
    *       RETURN        =
    ENDIF.

  • DIR creation from routing

    Hello All,
    I have a requirement to generate a document in SAP DMS (CV01N) for the assembly instruction using the process steps from routing(CA01).This would include inserting an assembly picture (JPEG) into original file which would reside in DMS and would link back to routing using the object link. The request for this process was to avoid the manual creation of the worksheet from routing. The series of steps in routing would be pulled into a excel document inside a DIR at click of a button from the routing screen. Updating the routing from the DIR screen should be blocked wit an error message.
    Please let me know if you guys have come across such requirements and what could be the possible solutions.
    Thanks in advance,
    P-

    Hi Paddy,
    For this requirement a z-develipment needs to be done with help of respective screen exits. You need to consult with Abap'r. In standard environment it's not feasible.
    Hope this will help.
    Regards,
    Ravindra

  • Creating Routings Operations using BAPI_ROUTING_CREATE

    Hello,
    I am creating Routing operations using BAPI_ROUTING_CREATE. The parameters which I am using are:
    PROFILE
    TASK
    MAT_ALLOC
    OPERATIONS.
    The group counter and group are given internal number assignment.
    In my case for 1 material number plant combination only 1 task exist. This can be considered as Header record. For this Header record there are multiple operations. My program calls BAPI only When any combination of MATNR or WERKS changes in MAT_ALLOC. It works fine for 1 operation but fails incase of multiple operations. The error is routing material assignment does not exist. I have checked for all madatory parameters in FM documentation. The BAPI when executed independently works fine but in program it fails.File format is
    Mat. No. Plant Key Date Status Usage Operation Number Work center Control Key Description val unit.
    I am calling BAPI only when Mat no or plant changes.Unitl then I append the data in internal tables.
    Passing the data in this format every operation is given Mat No and Plant, then y it is giving error routing material assignment does not exist.
    Please help in this regard.
    Thanks
    Khushboo

    Well actually that´s almost exactly what my task is as well.
    So what i do is:
    - reading the headdata of the given routing (the one which is to be copied)
    - reading the positiondata of the given routing (the one which is to be copied)
    then calling the BAPI_ROUTING_CREATE while exporting the headdata and the positiondata to the BAPI.
    It works perfect for the routing itself, but the BAPI doesnt create any operations while it displays a sucess message and NO errormessages.

  • Cisco ASA 5505 - outside can't DHPC as router use same range

    Hi
    Im new to the ASA and is trying to setup at test net. The ASA is connected to my router on port zero using DHPC.
    (Or i guess its not as the router use the same ip range as ASA does inside).
    I tried to set a static IP in the same range (eg. 192.168.1.20) but then get the message "cannot overlap with the subnet of interface inside".
    So I belive that is why it dont get a IP from my router - it does show up in the router DHPC table as 192.168.1.5 but ASDM home says outside "no IP address".
    I tried to change the inside range of the ASA but if I change the inside IP i loose connection.
    (Had to restore factory-default useing the console).
    I guess I could setup another range using the console, but how?
    How can I setup this test net?

    If I need to save I did not. (I have not used the console before).
    Found the: "write memory" and reload command.
    I cant connect to the asa using ADSM-IDM Launcher (from PC connected to the inside lan).
    It seems that the asa DHPC server does not work.
    And: show running-config
    ciscoasa# show running-config
    : Saved
    ASA Version 8.2(5)
    hostname ciscoasa
    enable password 8Ry2YjIyt7RRXU24 encrypted
    passwd 2KFQnbNIdI.2KYOU encrypted
    names
    interface Ethernet0/0
    switchport access vlan 2
    interface Ethernet0/1
    interface Ethernet0/2
    interface Ethernet0/3
    interface Ethernet0/4
    interface Ethernet0/5
    interface Ethernet0/6
    interface Ethernet0/7
    interface Vlan1
    nameif inside
    security-level 100
    ip address 192.168.2.1 255.255.255.0
    interface Vlan2
    nameif outside
    security-level 0
    no ip address
    ftp mode passive
    pager lines 24
    logging asdm informational
    mtu inside 1500
    mtu outside 1500
    icmp unreachable rate-limit 1 burst-size 1
    no asdm history enable
    arp timeout 14400
    global (outside) 1 interface
    nat (inside) 1 0.0.0.0 0.0.0.0
    timeout xlate 3:00:00
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    timeout tcp-proxy-reassembly 0:01:00
    timeout floating-conn 0:00:00
    dynamic-access-policy-record DfltAccessPolicy
    http server enable
    http 192.168.1.0 255.255.255.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart
    crypto ipsec security-association lifetime seconds 28800
    crypto ipsec security-association lifetime kilobytes 4608000
    telnet timeout 5
    ssh timeout 5
    console timeout 0
    dhcp-client client-id interface outside
    dhcpd auto_config outside
    threat-detection basic-threat
    threat-detection statistics access-list
    no threat-detection statistics tcp-intercept
    webvpn
    class-map inspection_default
    match default-inspection-traffic
    policy-map type inspect dns preset_dns_map
    parameters
      message-length maximum client auto
      message-length maximum 512
    policy-map global_policy
    class inspection_default
      inspect dns preset_dns_map
      inspect ftp
      inspect h323 h225
      inspect h323 ras
      inspect rsh
      inspect rtsp
      inspect esmtp
      inspect sqlnet
      inspect skinny 
      inspect sunrpc
      inspect xdmcp
      inspect sip 
      inspect netbios
      inspect tftp
      inspect ip-options
    service-policy global_policy global
    prompt hostname context
    no call-home reporting anonymous
    Cryptochecksum:5085ad55b43198c7490b2edfee450906
    : end

  • Can I use an airport express as a range extender to a NON apple router using an internet cable (so not wireless)

    can I use an airport express as a range extender to a NON apple router using an internet cable (so not wireless)

    Yes, if the AirPort Express is set up to create a wireless network that uses the exact same wireless network name as the other router and the same wireless network password as the other router.

  • Creation of role using T-code PFCG in R/3

    Hi Experts,
    I have created a Role using PFCG inorder to give acess only to three T-codes(PZ09. PZ80,PZ88).
    so i have created a role intially using PFCG and incorporated PZ09 tcode in it and assigend the Role to users in R/3. it is displaying the TCode(PZ09) in Portal.
    Now again i have added PZ80 & PZ88 to the same Role in R/3, but now i am getting an error:
    Infotype 0000 does not exist.
    but whereas when i assign SAP_ALL they(PZ88 & PZ 80) are working fine.
    Is they anything i can do so that i can avoid assigning SAP_ALL Profile to the users and eliminate the Error "Infotype 0000 does not exist.
    Thanks Inadvance,
    Regards,
    Siva

    Hi,
    Thanks for your reply,
    Creation of role using T-code PFCG in R/3
    The above link has solved my issue, Thank you!
    Regards,
    Siva

  • Creation of Material using BDC Session method & global class

    Hi
    Creation of Material using BDC Session method & global class by using oops.
    can anyone plz help me out

    Hi,
    it looks like it's not possible to call this BAPI wihtout material number. Here is a quote from BAPI documentation.
    When creating material master data, you must transfer the material
    number, the material type, and the industry sector to the method. You
    must also enter a material description and its language.
    Cheers

  • Problem regarding the creation of Table using CSS.

    Hi ,
    Here I have a Problem regarding the creation of Table using CSS.
    In My Application i have a table with multiple rows(Rows are Dynamically added to the table).First i am setting the table with the following properties:
    width:900px;
    height : auto,
    Overflow : visible,
    Max-height: : 200px.
    If I use above properties,I'm getting a table with 5 or 6 rows(height upto 200px).After that i am getting the Vertical ScrollBar.
    The problem is when a table has many columns, Vertical and Horizontal Scrolls are coming at the time of setting the table. The table height is not Increasing dynamically.
    How can i use "height" property in CSS? (I want the table height to be increased when the columns are more.)
    Thanks & Regards
    Madhavi

    Hey humble user. Errr I'm trying to understand what ur trying to do. U want to create a section of a region destructively from an existing region right? If so select the option convert to new region (opt-comm-R or selecting it by right clicking). Check your audio bin to make sure. Whats the "merge" function? Are u refering to the glue tool?

  • Automatic creation of Notification using T-code IK11

    Hi Gurus,
      i got stuck in a requirement, where they want Automatic creation of notification using T-code IK11.
    I am using EXIT IMRC0001.
        Please guide me that with what logic i should go.
    Thanks
    Regards
    VICKY
    Moderator Message: Vague Question. Expecting others to do your work for you => Thread Locked.
    Edited by: kishan P on May 12, 2011 12:35 PM

    In the role give Authorization object P_ORIGIN for Infotype 0, 1 and 2. with Authorization level as R (read)
    This will resolve your issue then no need to give sap_all authorization
    Good Luck
    - Ashish

  • Disable certain fields during the creation of SC using "create limit item"

    Hi,
    I have a requirement to disable certain fields from the role "SHOP" associated with the operational purchaser role. I would like to disable the fields "Unlimited check box", "Service Agent", " Invoice Only radio button", "Unknown account assignment radio button" from the screen I get during creation of SC using the option "Create Limit Item". Also i need to disable the option "Good / Service" entry box as we are using only free text items and donu2019t want this option to be seen in the screen when using the operational purchaser role.
    Please advise how can I achieve this.
    Regards
    GGL

    Hi,
    I have a same requirement to disable certain fields from the Shopping Cart Limit Item. I would like to disable the fields  "Service Agent", "Unknown account assignment radio button" from the Detail  screen. during creation of SC using the option  Limit Item .  Also i need to make default Value "Known" and "Invoice Only". But this is in SRM 7.0. Notes You have mentioned supports only Release 5.5, But I am in Release 7.0. Any idea?
    I appreciate your help
    Thanks,
    Monica

  • What is an easy web-page creation program for use with MacBook Pro?

    Can anyone suggest an easy web-page creation program for use with MacBook Pro?  I have used FrontPage with my PC, but am changing to a MacBook Pro.

    It largely depends on your skill level. Do you want to write web page code, or do you want to just design something and have it turn into a web page automatically?
    If you are more of a designer, try these:
    RapidWeaver
    Freeway Pro
    Muse
    If you want to write web page code, try these:
    Coda
    BBEdit
    Dreamweaver
    If you really don't want to write the code and want the best experience for your viewers, and you want to spend the least amount of time on it, my recommendation is:
    No program at all.
    Instead, sign up with a web site company like:
    WordPress.com (hosted by them) or WordPress.org (hosted on your server)
    Squarespace
    Wix
    The reason is that these companies have fully operational, nicely designed web site templates that you just fill in with your words and pictures, and they are ready to go. They also give you these benefits:
    Already designed to the latest web standards
    Already designed to resist hackers
    Already designed to work on all browsers
    Already designed to automatically adjust the page for readability on desktop, laptop, tablet, and smartphone screen sizes
    Already designed for accessibility
    Already designed for Search Engine Optimization so that your page will be found on Google
    Already designed with social media links built in if you want
    It is not like the old days where you build a site in Front Page and you assume it will only be seen on a desktop computer. If you build it yourself with a web page program, do you have the knowledge to make a site that works on all of the different web browsers and mobile devices, and is friendly to search engines and social media? If you don't have those skills, working with a website company can be a lot better, faster, and more reliable than trying to hammer all of that out yourself using code in some app.

  • Need code for Sales order creation in oops using xi as integration server

    Need code for Sales order creation in oops using xi as integration server.

    hi rocky,
              could you pls give a bit explanation on what you are expecting.
    regards,
    Pavan

Maybe you are looking for