How to bypass material rounding rules when using 'BAPI_PO_CREATE1'?

How to bypass rounding rules when create a PO using 'BAPI_PO_CREATE1'?
I faced a problem when using the BAPI to create PO. As the material has rounding rule, thus, when I create the PO using this BAPI, the quantity will be rounded according to the rule.
How can I bypass the rounding rule so that I can upload the quantity according to the quantity that specify in my upload file?
Edited by: Irene Sam on Jun 17, 2008 1:08 PM

I've solved the problem with passing the parameter no_rounding into the BAPI.
poitem-no_rounding = 'X'.
poitemx-no_rounding = 'X'.
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader         = poheader
          poheaderx        = poheaderx
        IMPORTING
          exppurchaseorder = w_ebeln
        TABLES
          return           = poreturn
          poitem           = poitem
          poitemx          = poitemx
          poschedule       = poschedule
          poschedulex      = poschedulex
          potextheader     = pohdrtext
          poaccount        = poaccount
          poaccountx       = poaccountx.

Similar Messages

  • How to produce Material output message when use bapi function?

    Dear Experts :
    I use bapi BAPI_GOODSMVT_CREATE to receive stock.
    I find the output message can't create automatically even when I have set the type in MR21.
    Hope someone can teach me how to produce the message when I create the material document by BAPI function.
    Thanks a lot.

    Hi,
    The messages are stored in the return table of the bapi.
    You can search in SCN or Google for BAPI error handling.

  • How to control the rounding rule at answer?

    Hi grus,
    I use the BIEE 11.1.1.6.5.
    And I create the 2 answers(A and B) with a same column which setting is same column formula and data format(Treat Numbers As "number", Decimal places "2") on column properties.
    Then I run the answer A that the value is 3.68( this column's SQL value is 3.675, so this means rounding up the value)
    But I run the answer B with same criteria that the value is 3.67(this means truncating the value)
    Why do these difference happen?
    How to control the rounding rule?
    Best Regards,
    Takashi

    Hi,
                 When add the Itemcode, default warehouse and costing codes (Profit Center) are automatically asign by SAP.
    When change the warehouse for this Itemcode, the costing codes(Profit Center) are disappear. I don't want to disappear the costing codes, that's why I try to resign the default costing codes when the warehouse change.
                At SAP 2005, easily  access the screen matrix in the marketing document and add the required values in each costing codes columns. But SAP 2007, all costing codes are combined in 1 col and those have the other screen.
              Do you have any idea to control the costing codes?
    Thanks and regards,
    Lei Nandar Myint

  • How can we get ADFSecurity work when used in OC4J, OID and OAM?

    I am getting error in http server log "mod_oc4j: Response status=499 and reason=Oracle SSO, but failed to get mod_osso global context."
    But I am not using Oracle SSO and my client doesn't want to use it either, I am using OAM SSO(CoreIDSSO) in my configuration. Please read the details below.
    I am using ADFSecurity in an app that is protected by OAM. To migrate ADFSecurity permissions from
    system-jazn-data.xml to OID, I used JAZNMigrationTool to populate OID with Grantees and Permissions. OAM gives login page, and authentication works fine.
    But ADFSecurity is not working. ADFComponent Delete button is enabled even for roles that dont have permissions for the iterator delete.
    - The app works fine when I use without OAM. ADF Security permissions work fine.
    - The app works fine when used with OAM, but with ADFSecurity disabled (enforce=false).
    - When I enforce ADFSecurity alongwith OAM, ADFSecurity is not working.
    In the doc "Oracle Containers for J2EE Security Guide b28957", there is a mention of use of CoreIDPrincipal for permissions. Our OID Permissions entries show
    LDAPRealmRole for attribute orcljaznprincipal. I am not sure if this could be the reason.
    We have configured AccessServerSDK for the SOA instance and have policy for the urls in the policy manager. We have entries in orion-application.xml, orion-web.xml and system-jazn-data.xml as per the documentations.
    How can we get ADFSecurity work when used with OID and OAM?

    Have you been able to successfully integrate OAS with OAM & OID? We have similar requriement and so far we have not been able to get it working.
    We have application specific roles which we map to OID roles using orion-application.xml.
    Any pointers to achieve this would be greatly appreciated.
    thanks,
    Dipal

  • How do I manage Lightroom photos when using 2 computers, keeping all edits made on either one?

    Based on http://forums.adobe.com/thread/1308132?tstart=0 I decided to add each question seperately:
    Hello, I'm quite interested in buying Lightroom 5.2. I tried the RC which ran out now. Yet, I have a several questions that I can't really find good conclusive answers to, that I'd like to get answered before buying LR. Please don't write maybe like this or that (assumptions), since I don't want to start my whole workflow and then realize that I have to change everything around, so please answer, if you know for sure that something works and you are, preferably, using that method too.
    This is the biggest question, where I mainly want a conclusive answer:  How do I manage Lightroom photos when using 2 computers, keeping all edits made on either one of them, using the same photos for editing. I won't use DNG. Details: I mainly use my older MacBook Pro, but would like to be able to use my PC as it's way better (Specs: i5 2500K, 16GB RAM, SSD, USB3, nVidia GTX 560 TI etc.). I have 2 external HDs that I could use, one for Backup and one for the actual Photos/Edits. I'll probably need to use it as my internal HDs are quite full, and I can't just delete stuff or move it to an (Developer programs, Lossless music, etc.).
    Based on this, how do I back up the whole thing e.g. Photos folder (all photos and edits, and preferably presets too)?

    I believe it should be possible to work cross-platform without having to relink files each time, or without having to keep exporting/importing the catalog, by keeping the single catalog and the image library on the one external drive which is then switched between systems as needed.
    Obvious first requirement is an external drive that is formatted in such a way (e.g FAT32) that it can be used on both platforms in read/write mode. Given that, if the catalog AND the images parent folder are both established at the same level in one overall parent folder, then it should be possible to take advatage of Lightroom's ability to use relative paths rather than absolute paths to detect the images, no matter if the drive is named (Mac) or lettered (PC). This is how "export as Catalog" works, i.e. it creates a "package", aka a parent folder, containing the catalog and a replica of the exported images folder hierarchy alongside the catalog. Take that "package" to another system (same OS or not) and "it just works" even if the drive letter is different or the OS is different....because the relative path from catalog to images is still the same.
    I haven't tested this cross-platform (though I have between different PC systems with different drive letters) so for me it's still just a theory, but there may be others who have done this successfully.

  • How do I close a JInternalFrame when using subclasses and a separate cla...

    The heading should be: How do I close a JInternalFrame when using subclasses and a separate class for the actionListener?
    I have just created a JInternalFrame appclication and now I want to structure up my code. I have a Superclass that contains the usual settings for the two JInternalFrame:s, and the two subclasses with frame specific information. Both the JInternalFrames use the same OK button. I want to have the actionListener outside the classes to avoid repetition of code. But the dispose()-function does not work properly, it does not close the opened JInternalFrame. What�s wrong?
    class Superclass extends JFrame
         JButton b= new JButton("ok");    
         Superclass()
    class Subclass1 extends Superclass
         Subclass1 ()
              add(ok);
           ok.addActionListener(new Listener());
    class Subclass2 extends Superclass
         Subclass2 ()
              add(ok);
           ok.addActionListener(new Listener());
    class Listener extends Superclass implements ActionListener
         public void actionPerformed(ActionEvent e)
                   dispose();
    }How do I controll in the Listener class that the button in Subclass1 is beeing pressed?

    First of all I think I misunderstood your question. You said you had two internal frames, so I thought you wanted to close the internal frame.
    It now looks to me like you want to close the entire JFrame, which makes the code even a little easier. Something like:
    JComponent component = (JComponent)event.getSource();
    JFrame frame = (JFrame)SwingUtilities.windowForComponent( component );
    frame.dispose();
    Ok, I will make a try:
    public static Container getAncestorOfClass(Class c, Component comp)
    w.getAncestorOfClass(w, this); Fiirst you need to learn the basics of reading the API.
    "getAncestorOfClass()" is a static method. That means you don't use a variable to invoke the method. You use the class itself.
    "w" is a variable, which is a JFrame, but that is not what the first parameter should be. The first parameter is a "Class".
    "this" will refer to your Listener class, but you need the Component that generated the ActionEvent.
    When I thought you wanted to close an internal frame then the code would have been something like:
    JComponent component = (JComponent)event.getSource();
    Container container = SwingUtilities.getAncesterOfClass( JInternalFrame.class, component );
    JInternalFrame internalFrame = (JInternalFrame)container;
    internalFrame.invokeSomeMethodHere();If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
    http://homepage1.nifty.com/algafield/sscce.html

  • How do I stop system sounds when using AirPlay on my MacBook Pro?

    Hi all,
    Probably a quick question, but I'm fairly new to Macs. I've a Macbook Pro 13 Late 2011 and now I've got an Apple TV, I use AirPlay. But how do I stop system sounds when using AirPlay?
    Many thanks in advance, Jon.

    Open AirPort Utility located in HD > Applications > Utilities
    From the AirPort Utility menu bar click AirPort Utility > Preferences
    Deselect:   Monitor AirPort base stations for problems

  • How can I customize the toolbar when using the attribute browser

    In CVI 2012, the toolbar changes depending on the environment, e.g. it is different for the source window and the UI editor. The toolbar can be customized using the menu Options / Toolbar...
    Unfortunately, when using the attribute browser of the UI editor, another toolbar is displayed, i.e. not the UI editor toolbar.... I would have assumed that the attribute browser belongs to the UI editor, obviously it doesn't... So how can I customize the toolbar when using the attribute browser?
    Solved!
    Go to Solution.

    Luis,
    It's nice to have you back 
    Thank you for the clarification, so I'll elaborate a bit more: In the regular workspace toolbar, I have a disk symbol to save the file. This symbol is gone in the attribute browser...
    So I have three different toolbars, for source code (workspace), UI editor, and the UI editor displayed but the attribute browser clicked on (selected)... 
    Thanks
    Wolfgang
    Source code:
    UI editor:
    Attribute browser:

  • Need to bypass Material substitution rule for SO created through RFC

    Hello SAP Geniuses,
    I have an external process that creates Sales orders using a RFC calling BAPI_SALESORDER_CREATEFROMDAT2.
    My Users want to create orders for Materials that have substitution rules defined, but they want to bypass these rules when the Sales Orders are created from the external process. Other Users in the same Sales Organization and Distribution Channel need the substitution rule to sell these materials, so config cannot solve this.
    I have already tried detecting when  VBAP-MATNR NE VBAP-MATWA  and calling BAPI_SALESORDER_CHANGE with the original MATNR, but the same substitution occurs in this FM.
    Can anyone point me to a User Exit or BADI that can add flexibility to the Material Substitution mechanism in SD module?

    Jack,
    You are a genius!
    These are the steps I followed to implement this idea:
    1) VOFM -> Requirements -> Material determination -> New rule in the 800 series
    2) Insert code into rule with SSCR key; Activate code; Activate rule.
    3) Run utility program RV80HGEN to create rule in FG V61D -> SAPLV61D -> LV61DNNN -> RV61DNNN -> RV61D8xx
    4) SPRO-> Sales and Distribution -> Basic Functions -> Maintain Prerequisites for Material Determination -> Maintain procedure -> select procedure -> double-click "Control data" -> enter rule into box "Requiremnt". Save.
    5) SPRO-> Sales and Distribution -> Basic Functions -> Assign Procedures To Sales Document Types -> select doc type of interest -> enter procedure name into field "MatDeterm." for doc type. Save.

  • How can i set  "Createdby" attribute  When using Custom JheadStart Security

    Hello
    We do not use JASS for Authentication , please help us how can i set createtby attributes with jhs.username in application for any entity object?
    thanks

    See a similar question at History Attributes when using Custom Authentication Type

  • How to upload material text  in mm02 using bdc table control

    i have problem to upload material Description in mm02 using bdc.
    my text file is like
    2000251     AF     A12345               
    2000251     AR     B12345               
    2000251     BG     C12345               
    2000252     AF     F12345               
    2000252     AR     G12345               
    2000252     AF     H12345     
    i want to upload material number, language, and material description, how can i upload pls help me.

    Hi,
    Try with bapi , bapi_material_save_data.. didn't exactly remember it,Please check the same.
    Regards,
    Nagaraj

  • How to skip authorisation for infotype when using dynamic selection ?

    Hi folks,
    I have a problem here.
    When im using dynamic selection screen, i cannot skip authorisation for subtypes of an infotype. Eg. if my record for 0185 have records that do not have authorisation for the subtypes. Dynamic selection will filter away this record and will not get me into the Get Peras as id i use to run has authorisation configured. IT will skip out of Get Peras.
    However, if im not using dynamic selection screen, i will use the normal pnpce fields, i will be able to get the record, as i do my authorisation check using function module in the get peras, and i did not declare 0185 in the infotypes.
    May i know if there is any solution to this problem as dynamic selection screen is a standard...
    Thanks,
    lihui

    hi,
    however i cannot skip authorisation for the whole pernr as i need the authorisations for the processing reports.
    Currently the case is like this..
    i have a authorisations for infotype 0185. i have 2 subtypes records such as ZA and ZB. the user does not have authorisation to read ZB but has authorisation to read ZA.
    However, when use dynamic selection, it will skip out the pernr.
    If the pernr 0185 records has only ZA subtype but no ZB subtype, it will not skip this pernr when using dynamic selection.
    Anymore idea how to overcome this?

  • How do i see the thumbnails when using File Explorer

    How do I get to see the thumbnail preview when using File > Open?

    Not sure if this has been answered yet, but Illustrator thumbnails aren't showing in Creative Cloud Web file list. Also, anywhere to quick preview/navigator the file?

  • How to extend material cross many plants using BAPI?

    Hi.
    when i use BAPI 'BAPI_MATERIAL_SAVEDATA' to extend material cross plants, i can not extent accounting view.
    code as below:
                BAPI_MARC-PLANT = IT_GOUJIAN-WERKS.
                BAPI_MARCX-PLANT = IT_GOUJIAN-WERKS.
                CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
                  EXPORTING
                    headdata            = BAPIMATHEAD
                   CLIENTDATA          = BAPI_MARA
                   CLIENTDATAX         = BAPI_MARAx
                    PLANTDATA           = BAPI_MARc
                    PLANTDATAX          = BAPI_MARcx
                   VALUATIONDATA       = BAPI_MBEW
                   VALUATIONDATAX      = BAPI_MBEWX
                  IMPORTING
                    RETURN              = IT_RETURN.
                 TABLES
                   MATERIALDESCRIPTION = IT_MATERIALDESC.
    i just change the plant data.
    any advice?

    You can extend the material in several plants using
    BAPI_MATERIAL_SAVEDATA
    All you need to do is populate the import parameter
    WA_HEADDATA-MATERIAL
    WA_HEADDATA-IND_SECTOR
    WA_HEADDATA-MATL_TYPE
    and check the views that you want to maintain in the new plant.
    Suppose you want to maintain only Basic view than..
    WA_HEADDATA-BASIC_VIEW = 'X'.
    And based on selected views , you need to populate other
    parameters.
    like I want to maintain basic view in another plant than
    I need to populate the plant data.
    WA_PLANTDATA-PLANT = <PLANT>.
    populate other fields, if required.
    WA_PLANTDATAX-PLANT = <PLANT>.
    populate flags, if required.
    and pass these parameters to the Function module.
    It should work.
    Please reward, if you find the answer useful.

  • HT204291 How does one get full screen when using air play on my tv from my iPad,thanks in advance

    How does one get a full screen when using air play on my tv when I'm mirroring,.? Thanks in advance

    The iPad's display is 4:3, so it cannot fill your TV screen, which is 16:9
    The only way is to change your TV settings and stretch the image.

Maybe you are looking for