BAPI DimAs problem

You have to excuse my question if this is a simple problem but I'm just getting into BAPIs.
I have been tasked with creating an application that will create goods movements in SAP through watching a database table.  That in and of itself isn't that big of a task (I believe).
So using the SAP documentation on BAPIs I created a little test driver to try and do some test transactions on our company's test system.  So I have the following code:
    Set oBAPICtrl = CreateObject("SAP.BAPI.1")
    Set oLogonCtrl = CreateObject("SAP.LogonControl.1")
    oBAPICtrl.LogLevel = 9
    oBAPICtrl.BAPIExceptionCodes = True
    Set oBAPICtrl.Connection = oLogonCtrl.NewConnection
    oBAPICtrl.Connection.Client = "800"
    oBAPICtrl.Connection.Destination = TESTSYSTEM
    oBAPICtrl.Connection.Language = "E"
    oBAPICtrl.Connection.User = USERNAME
    oBAPICtrl.Connection.Password = PASSWORD
    oBAPICtrl.Connection.Logon 0, True
    Set oGM = oBAPICtrl.GetSAPObject("GoodsMovement")
From there I started out testing against the GetItems which worked exactly as expected.  So I next started working with the CreateFromData function and this is where I've encountered a problem that I'm having problems solving.
When I try to use the DimAs method to create the objects for the parameters sent in the CreateFromData method, 3 of the 5 calls fail. 
i.e. take the following code
    Set oGM_CFD_Code = oBAPICtrl.DimAs(oGM, "CreateFromData", "GoodsmvtCode")
    Set oGM_CFD_Header = oBAPICtrl.DimAs(oGM, "CreateFromData", "GoodsmvtHeader")
    Set oGM_CFD_Item = oBAPICtrl.DimAs(oGM, "CreateFromData", "GoodsmvtItem")
    Set oGM_CFD_Return = oBAPICtrl.DimAs(oGM, "CreateFromData", "Return")
    Set oGM_CFD_HeaderRet = oBAPICtrl.DimAs(oGM, "CreateFromData", "GoodsmvtHeadret")
Setting using DimAs against GoodsmvtCode, GoodsmvtHeader, and GoodsmvtHeadret fails and instead sets the corresponding objects to "Error 0"
I've turned on tracing to the highest level and still don't see anything that may lead to why these 3 calls are failing.  At first I thought that there may be some form of typo, so I copied the named directly out of the tracing file and still the same result.
Can anyone give me some ideas as to why these are failing?

Hi Joe,
There isn't really a good forum to post this question.  So failing that, the ABAP forum is probably the best as it attracts the most people. 
In my experience, not many people who are doing much VB integration with SAP (I am sure there are lots, but I mean relative to Java,COM,XML,etc.), so I guess there isn't a deep pool of people who can address your question (as demonstrated by the lack of responses).
I did check the parameters of the BAPI to see if there was anything different with the three that failed, but they seem to be pretty straight forward to me.
As you had success with the Getlist, its clear that all your software layers are put together ok, the only possible explanation that comes to mind is some non-obvious bug in your code.  All I can suggest doing is to cut out your code and start again.  Sometimes typos are incredibly hard to spot (and not just in the parameter names), and it could be something is just missing somewhere.  If the second time works then you can compare old with new.
Not really a very encouraging response but the best I can come up with at this point.
Brad

Similar Messages

  • W520 dimming problem

    Just received my w520 and I've having a dimming problem.   When I plug my HDTV into the laptop,  it comes up nice an bright.  After a while it dims even though I have
    Timers Off
    Brightness set to Maximum
    The really strange thing is when switch the display control fn + f7 to turn on both the laptop monitor and the HDTV,  the laptop monitor is not dimmed.  
    Any ideas?

    hey sparcusa1,
    I would recommend updating your system first via the ThinkVantage Tool .
    Also do check the settings for your power management, it might be that it is set to a "power save" option
    WW Social Media
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    Have you checked out the Community Knowledgebase yet?!
    How to send a private message? --> Check out this article.

  • Report and BAPI , Scheduling Problem

    Hi Gurus,
      I'm having a problem, I've a query/report that should be executed every 2 wed of the Month and A BAPI is associated to the query,and It's not working properly .it's developed by some other developer went to TCode RSCRM_BAPI,RSRTRACE,MDXTEST but it's of no use, My  Question's is what's that trigger the event to run on 2 wed of every month.
    Please,Help me .

    I forgot to tell you that , the query will generate a file for 3rd Party processing

  • Samsung 24-inch display auto-dimming problem

    Right out of the box 3 or 4 months ago, my Samsung 24 inch 2443 BW dims uncontrollably whenever I have a window open that has mostly black or other dark-colored background - say about 60% black; I can actually watch the whole screen and desktop - not just the window - brighten or darken in response to manipulating the images and/or background color in the window. This is on a G5 1.8GHz dual with a GeForce FX 5200, running 10.4.11. It doesn't depend on the ambient light. The System Prefs doesn't offer any way to control auto-dimming. I'm thinking it could be a driver problem, maybe related to the fact that I am still using 10.4.11.
    Has anyone had a similar problem and found a fix or workaround? Thanks.

    Problem solved! This morning (yes, I should've done this 6 months ago, soon after I bought the unit). As a prelude to returning the unit to Samsung, I finally took the 2443 BW back to my local Apple (specialist) dealer (not an Apple Store. They're independent and don't usually "do PCs", although they can if required). Of course I made sure I had some images that were guaranteed to demonstrate the problem. Their "service genius" watched the behavior for less than a minute and promptly fixed it. (Kudos! )
    All that was needed was to "turn off" the "Dynamic Contrast" option from the Samsung's menu (MENU > Picture > MagicBright > Dynanamic Contrast), by selecting one of the other (static) options instead - I preferred the "Sport" option.
    When I got it reconnected at home, I adjusted the contrast and brightness settings on the Samsung's Menu to suit me. I am also using the (Apple > System Preferences > Displays > Color > Adobe RGB (1998) Display profile instead of the one labeled "SyncMaster"). The SyncMaster display profile makes the screen look very washed-out.
    This dialogue has definitely helped, by helping to pinpoint the monitor itself as the most likely source of the problem.
    Cheers

  • G550 Dimming problem

    For some reason, whenever I leave my laptop for more than about 1-2 minutes the display dims/goes black. I've tried to adjust the power settings, the display settings etc but can't seem to get the screen to stay lit. This is particularly a problem when I'm trying to watch a movie on my computer and every minute have to move my finger across the touchpad to keep the screen bright.  I'm not sure what else I should change. PLEASE HELP!

    hey wrjj20,
    try uninstalling the power management software; then set the power options via windows built-in power manager.
    see if the built-in power manager from windows makes any difference.
    is your Lenovo Energy Management at version 4.3.1.2 ? if you could, try reinstalling the graphic driver for your unit as well.
    WW Social Media
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    Have you checked out the Community Knowledgebase yet?!
    How to send a private message? --> Check out this article.

  • MacBook Pro strange application dimming problem

    So my brand new MBP has worked with no problem now all of a sudden when working in an application it will dim as though I have opened another page or something. Then I have to reclick on the page so that I can finish typing/working/etc. In fact it has done it 7 times while writing this post! I have no new updates or anything else to run. Any ideas at all?

    Sigh - microwaving only makes them angry
    Earlier I asked about a mouse. Are you using just the MBP or do you have mouse connected? In some situations a mouse and trackpad can interfere with each other. If no mouse, try creating a new account and boot into it. (Also disconnect all peripherals so we can be sure it is just the computer & you.) If you have any background processes that are the culprit they shouldn't be able to affect the new account. If the problem follows you to your new account we can be pretty certain you have a wonky trackpad. If it doesn't follow then we know it is some background process to track down.

  • Mavericks screen dim problem

    Every time my macbook starts dimming the screen, to then turn it off after a couple of seconds, if I move the mouse in that time interval (dim screen before it’s off), then I get a black screen and I have to restart to make it work again. I have had this problem several times with Mavericks, is there any way to solve it?
    When I turn the macbook back on I get this message “Your computer was shut down because of a problem ….”

    Hello marwandese,
    Thank you for the details of the issue you are experiencing with your MacBook Air display.  
    I found an article with steps to troubleshoot issues with displays.  This article is for internal and external displays, so you can skip any steps referring to an external display.  I recommend reviewing the full article, but this step specifically stands out to me for the issue you described:
    Reset the system
    You can reset the Mac's parameter RAM and SMC.
    You can find the full article here:
    Apple computers: Troubleshooting issues with video on internal or external displays
    http://support.apple.com/kb/ht1573
    If the issue persists after following the steps in that article, I recommend following the steps in the following article:
    OS X: When your computer spontaneously restarts or displays "Your computer restarted because of a problem."
    http://support.apple.com/kb/TS4636
    Thank you for posting in the Apple Support Communities.
    Best,
    Sheila M.

  • Calc Dim Problem

    Hi gurus,
    i have a calcscript to clear data(replacing data with #missing) in particular combinations and aggregating the period dim by using Calc Dim.
    Problem is,when i cleared data first time in Halfyearly2 it is only clearing data For Idesc of H2 and aggregating correctly with H1 data to YearTotal.
    Now second time when cleared data in Halfyearly1 data clear is succesfull but comes to aggregation still i have data in Yeartotal though
    descendants of H2 data and H1 data is missing.
    Why i'm still having data in yeartotal though Idesc of H1 and Idesc fo H2 data is missing and also aggregating the period dim.
    thanks in advance
    Edited by: kailash on Sep 17, 2011 7:22 PM

    Hi Kailash - this all sounds like normal Essbase BSO behaviour. You can control whether missing values aggregate up using the SET AGGMISSG command / 'Aggregate Missing Values' database settings. Check out the Tech Ref / DBAG / EAS Help sections:
    http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_tech_ref/set_aggmissg.html
    http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_dbag/dcaoptcs.html#dcaoptcs61358
    http://download.oracle.com/docs/cd/E17236_01/epm.1112/eas_help/aggmissg.html
    The brief explanation is that with AGGMISSG ON, where all child values are #Missing a calculation will roll them up to a #Missing value at the parent. With AGGMISSG OFF, where all child values are #Missing a calculation will not alter the parent value.
    You have to be careful with using this globally if you sometimes load data directly to non-level-zero members, as values can then be overwritten.

  • Screening Dimming Problem

    Hi everyone,
    I find the "automatic dim display before sleep" to be very annoying. So naturally, I go into Energy Saver, and disable it. Ok, all is well, until I connect an external monitor/TV. Then even with or without the monitor connected AND the dimming check-box still deselected, my PowerBook's display defaults back to it's Auto-Dim setting. Argh, how can I fix this? Has anyone run into this problem?
    I've tried the Terminal "pmset" option of changing the halfdim setting to 0 instead of 1, which is the same has using the Energy Saver option. Even after plugging and unplugging the ext. monitor, the screen dimmed after a while, and I verified in Terminal (pmset -g), that the value of halfdim was indeed still 0.
    Thanks,
    William
    12" PowerBook G4/1.5GHz/SuperDrive/80GB/1.25GB RAM   Mac OS X (10.4.7)   4G 20GB iPod, OWC Mercury Elite Pro 500GB FW HD, OWC Portable 80GB FW HD

    Hi William, have you tried creating a test user and testing the behavior in the fresh account? If it behaves in the new user then delete ~/Library/Preferences/com.apple.systempreferences.plist then log out and back in or restart.
    -mj
    [email protected]
    Message was edited by: macjack

  • Sales Order Inquiry bapi upload problem

    Hi All..
    when iam trying to upload SO inquiry sample data through bapi iam getting these Errors :
    Material 1423 is not defined for sales org.1000,  distr.chan.12,  language DE
    Error in SALES_ITEM_IN 000000
    Sales document  was not changed.
    but i defined 1423 material in sales org.1000,  distr.chan.12.
    here is my abap code.
    *& Report  ZSAMPLE
    REPORT  zsample.
    DATA:lt_header LIKE bapisdhd1 OCCURS 0 WITH HEADER LINE,
         lt_inquiry_items_in LIKE bapisditm OCCURS 0 WITH HEADER LINE,
         lt_inquiry_items_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE,
         lt_header_x LIKE bapisdhd1x OCCURS 0 WITH HEADER LINE,
         lt_partners LIKE bapiparnr OCCURS 0 WITH HEADER LINE,
         lt_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    lt_header-doc_type = 'ZSJ1'.
    lt_header-sales_org = '1000'.
    lt_header-distr_chan = '12'.
    lt_header-division = '00'.
    lt_header-purch_date = '20081121'.
    lt_header-purch_no_c = '7654321'.
    APPEND lt_header.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = lt_header-doc_type
      IMPORTING
        output = lt_header-doc_type.
    APPEND lt_header.
    lt_header_x-updateflag = 'U'.
    lt_header_x-doc_type = 'X'.
    lt_header_x-sales_org = 'X'.
    lt_header_x-distr_chan = 'X'.
    lt_header_x-division = 'X'.
    lt_header_x-purch_date = 'X'.
    lt_header_x-purch_no_c = 'X'.
    APPEND lt_header_x.
    *lt_inquiry_items_in-currency = 'USD'.
    *lt_inquiry_items_in-ITM_NUMBER = '0010'.
    *lt_inquiry_items_in-plant = '0001'.
    lt_inquiry_items_in-material = '000000000000001423'.
    lt_inquiry_items_in-itm_number = '000010'.
    *lt_inquiry_items_in-exchg_rate = '1000000'.
    APPEND lt_inquiry_items_in.
    lt_inquiry_items_inx-updateflag = 'U'.
    lt_inquiry_items_inx-ITM_NUMBER = 'X'.
    lt_inquiry_items_inx-PLANT = 'X'.
    lt_inquiry_items_inx-material = 'X'.
    lt_inquiry_items_inx-itm_number = 'X'.
    APPEND lt_inquiry_items_inx.
    lt_partners-partn_role = 'SH'.
    lt_partners-partn_numb = '0000000149'.
    APPEND lt_partners.
    CALL FUNCTION 'BAPI_INQUIRY_CREATEFROMDATA2'
      EXPORTING
    SALESDOCUMENTIN               = ' '
        inquiry_header_in             = lt_header
        inquiry_header_inx            = lt_header_x
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
    IMPORTING
      SALESDOCUMENT                 =
      TABLES
       return                        = lt_return
       inquiry_items_in              = lt_inquiry_items_in
       inquiry_items_inx             = lt_inquiry_items_inx
        inquiry_partners              = lt_partners
      INQUIRY_SCHEDULES_IN          =
      INQUIRY_SCHEDULES_INX         =
      INQUIRY_CONDITIONS_IN         =
      INQUIRY_CONDITIONS_INX        =
      INQUIRY_CFGS_REF              =
      INQUIRY_CFGS_INST             =
      INQUIRY_CFGS_PART_OF          =
      INQUIRY_CFGS_VALUE            =
      INQUIRY_CFGS_BLOB             =
      INQUIRY_CFGS_VK               =
      INQUIRY_CFGS_REFINST          =
      INQUIRY_TEXT                  =
      INQUIRY_KEYS                  =
      EXTENSIONIN                   =
      PARTNERADDRESSES              =
    READ TABLE lt_return WITH KEY type = 'E'.
    WRITE : /5 lt_return-type, 20 lt_return-id , 30 lt_return-number , 50 lt_return-message.
    IF sy-subrc NE 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        WAIT          =
      IMPORTING
        RETURN        =
    ENDIF.
    Thank you,
    Madhu Rao.

    hi
    Use FM conversion_exit_alpha_input... and give the number exactly as the size of the field.. if there are any prefix 0's which are not given in the field.. the BAPI wont execute..
    if it is in the database as 00001423 and ur giving it as 1423...it wont take it...
    Check the master table of material to see how it is stored in database.
    and pass exact value.
    Regards,
    Vishwa.

  • BAPI, facing problem(urgent)

    Hi all,
    seagate is our customer & motorola is our end customer. so first, motorola gives PO to seagate. here , seagate is the vendor for motorola. seagate receives that PO & adds some data( like seagate sales order no,seagate material no, seagate item no etc.) to that PO. then seagate passes that modified PO to my company through EDI.
    for this said PO , i have already created sales order in BAPI & now need to crete shipment order.
    To create shipment order,i am using BAPI_SHIPMENT_CREATE. seagate wants my company, to put so many datas into shipment order but i am not finding those fields in that BAPI FM.
    1)i am describing those fields below.plz suggest me if there is corresponding fields in that BAPI_SHIPMENT_CREATE function module.
    i)shipment identification no.
    ii)purchase order no of seagate.
    iii)PO date
    iv)PO type
    v)Transportation method/type.
    vi)shipment method of payment.
    vii)payment terms.
    viii) Hierchical ID no.(To identify a perticular data segment in a hierchical structure)
    ix)Hierchical parent ID no.(identification no. of the next hierchical data segment)
    x)for pallet,
    i) seagate pallet no
    ii)Hierchical ID no
    iii)hierchical parent ID no
    xi) for carton,
    i)seagate carton no
    ii) hierchical ID no
    iii) hierchical parent ID no
    ( FOR ITEM IDENTIFICATION)
    i) seagate's customer's (i.e motorola) PO material no.
    ii)seagate's customer's PO item no.
    iii)seagate's sales order item no.
    iv)seagate's material no.
    v)no. of units shipped(qty in the carton)
    vi)no. of units shipped(qty in the pallet)
    vii)unit/ basis for meas code for this qty.
    (FOR SUBLINE ITEM DATAIL)
    i)seagate's barcoded serial no
    ii)product date of manufacturer
    iii)relationship code(relationship between subline item to baseline item)
    OR is there any other BAPI to create shipment.
    plz suggest me .it is very urgent.
    Thanks & Regards

    Did you read the documentation of the BAPI, most of the input parameters are self-explanatory.  Go to SE37 and enter BAPI_SHIPMENT_CREATE, and go to IMPORT thats where you have the header details and in the TABLES you have all the item details.  Just double click on the type they refer to, am sure its easier for you to find out all your parameters.  Also do a test run using F8 before you code as this would help you in identifying the parameters and speed up your process.  If your test case is successful store it as a variant and refer to it when you are coding.
    hith
    Sunil Achyut

  • BAPI - refresh problem

    Hi,
    I have created a module poool program which displays list of sales orders.User can select any of the Sales Order & click on a button 'PO Create'.This triggers " BAPI_PO_CREATE1" and creates PO for sales order based on Purchase Requisition number provided.
    There is no problem when i am creating PO for one sales order ,now be on the same screen (screen where list of sales orders are displayed) select one more Sales Order after PO gets created for first sales order again click on "PO create" button.Now PO gets created for second sales order but the Pricing Conditions in the Sales Order will get cleared.And in VA02 or VA03 there will not be any pricing conditinons.
    But if i completely come out of the screen,again execute transaction Po gets created with out any problem.
    Please suggest how  & where the problem lies?
    Do we need to refresh ABAP or SAP memory?How to do this?
    Thank you

    hai ,
    when u r  coming out of the screen and executing it is workign fine
    but when u r  doing fom the same screen it is not working ,
    so u create a clear button when u select it it clear all the fields so that the old data is refreshed instead of going out of the screen and coming back
    M.A

  • BAPI BAPI_OPPORTUNITY_CREATEMULTI - Problem with Quantity and Unit

    Hi,
    I have the requirement for creating multiple line items in Oppurtunity with BAPI BAPI_OPPORTUNITY_CREATEMULTI, I am able to create multiple line items in product tab in Oppurtunity.
    But now those line items are stored Without Quantity and Units.
    I have passed units in product table at fields : volume_unit, process_qty_unit, process_volume_unit_iso.
    I have passed quantity in product table at fields : process_qty_unit, process_qty_num, process_qty_den.
    Same quantity is also passed at schedule line item field : quantity
    Can any1 please suggest?
    I tried with all combinations of above possible fields.
    I am not sure If i have mistaken in Input fields being passed to this bapi?
    Thanks in advance.
    Regards,
    Narendra.

    Quantity is maintained under scheduling, so you must include in 'CRM_ORDER_MAINTAIN' under exporting parameters also...
    EXPORTING
         it_schedlin_i     = lt_schedlin_i
    Coding for lt_schedlin_i is...
    ls_schedlin_i-ref_handle = "counter".
    ls_crmt_schedlin_extd-quantity = "quantity".
    INSERT ls_crmt_schedlin_extd INTO TABLE ls_schedlin_i-
    Coding for input fields is...
    ls_input_field-ref_handle = "counter".
    ls_input_field-ref_kind  = 'B'.
    ls_input_field-objectname  = 'SCHEDLIN'.
    ls_input_names-fieldname  = 'QUANTITY'.
    INSERT ls_input_names INTO TABLE ls_input_field-field_names.
    INSERT ls_input_field INTO TABLE lt_input_field.
    Regards.

  • BAPI failure problems in XI

    Hi all,
    I was trying this scenario,
    /people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi
    I had these q`s
    1) suppose if the BAPI fails to update/extract details where will we check for the failure?
    Is it in the BAPI return structure? or in the SXMB_MONI?
    Please provide your answers.
    Thanks.

    Hi,
    In teh return structer of the BAPI, u might have a RET code whihc might tell that the BAPI aws executed successfully or not... so u can always look in SXMB_MONI.
    But it also depends if the BAPI is updating any values in the return structure if there are any errors in processing..
    Cheers,
    Siva Maranani.

  • Lenovo Tab S8 50 Screen Dimming Problem

    Hello, 
    I have noticed that the screen is adjusting brightness depending what is on screen, bright or dark image. This is much more noticable in the lower brightness setting. I think that this is somekind of power saving feature of the Intel CPU/GPU. Maybe something like android version of Display Power Saving Technology.
    Yoga 2 Pro, a windows device, has the same feature/problem but on windows there is a way to solve it. (https://forums.lenovo.com/t5/Yoga-Flex-Laptops-and​/Yoga-2-Pro-Auto-brightness-feature-and-how-to-dis​...
    What about android? 
    Thanks,
    Christos

    Well I tried with this settings and I still have the problem but I think it is less noticable.
    <ThrottleNormal>100</ThrottleNormal>
    <ThrottleWarning>80</ThrottleWarning>
    <ThrottleAlert>60</ThrottleAlert>
    <ThrottleCritical>40</ThrottleCritical>
    Now I am trying with all settings at same value:
    <ThrottleNormal>40</ThrottleNormal>
    <ThrottleWarning>40</ThrottleWarning>
    <ThrottleAlert>40</ThrottleAlert>
    <ThrottleCritical>40</ThrottleCritical>
    For now I think it's working but I don't know for sure. Maybe a placebo effect! You can try so we can verify!
    P.S. I have no Idea if this is safe for the device and I am starting to lose hope on lenovo, I mean I had to void my warranty (by rooting) to fix this tablet's problems.

Maybe you are looking for