Problem with a BAPI collecting dunning levels

Hello all experts,
I am having a problem with BAPI “DebtorCreditAccount” (called from a VB program), collecting dunning levels.
The BAPIs is called like follows (only the essential code is shown):
The first function (GetCustomerCurrentBalance) works fine but the second (GetCustomerHighestDunningLevel) doesn’t work.
    Public Function GetCustomerCurrentBalance(ByVal strCustomerID As String) As Decimal
        Dim objARAccount, objReturn, objActualBalance As Object
        Try
            objARAccount = Me.p_sapBapi.GetSAPObject("ARAccount", "1000", Me.ConvertCustomerID(strCustomerID))
            objARAccount.GetCurrentBalance(Return:=objReturn, ActualBalance:=objActualBalance)
            Return CType(objActualBalance.Value("TOTAL_BAL"), Decimal)
        Catch ex As Exception
            Return 0
        Finally
            objARAccount = Nothing : objReturn = Nothing : objActualBalance = Nothing
        End Try
    End Function
    Public Function GetCustomerHighestDunningLevel(ByVal strCustomerID As String) As Integer
        Dim objDebtorCreditAccount, objReturn, objHighestDunningLevelD As Object
        Dim objTEST1 As Object
        Try
            objDebtorCreditAccount = Me.p_sapBapi.GetSAPObject("DebtorCreditAccount", Me.ConvertCustomerID(strCustomerID), "0001")
            objDebtorCreditAccount.GetHighestDunningLevel(Return:=objReturn, HighestDunningLevelD:=objHighestDunningLevelD)
            Return CType(objHighestDunningLevelD.Value("DUNN_LEVEL"), Integer)
        Catch ex As Exception
            Return 0
        Finally
            objDebtorCreditAccount = Nothing : objReturn = Nothing : objHighestDunningLevelD = Nothing
        End Try
    End Function
The error message I get is:
Message: The runtime object of type DebtorCreditAccount with the persistent key 00000480060001 could not be created in the Business Object Repository.
Message-Nr: 826
Workarea: OL
R/3 error message: Object does not exist
Please give me some input on how to proceed!
Best Regards,
Niklas

Thanks Vijaya for your fast reply. The parameters that I am giving as input are however correct.
I have investigated the problem a bit further and tried some other calls.
If I just chose to create an object of the type “DebtorCreditAccount” (without submitting any parameters) and then use the same method call as before (se code in topic above) I get the following error: “Mandatory parameter HIGHESTDUNNINGLEVELA missing.” This must mean that it knows that something is missing.
objDebtorCreditAccount = Me.p_sapBapi.GetSAPObject("DebtorCreditAccount")
objDebtorCreditAccount.GetHighestDunningLevel(Return:=objReturn, HighestDunningLevelD:=objHighestDunningLevelD) 
If if add the mandatory parameter “HIGHESTDUNNINGLEVELA” I get the error message "The persistent key for an business object instance of type DebtorCreditAccount has not been set. Cannot invoke method GETHIGHESTDUNNINGLEVEL”. This I interpret as the object has not been right instantiated. This brings me back to square one.
objDebtorCreditAccount = Me.p_sapBapi.GetSAPObject("DebtorCreditAccount")
objDebtorCreditAccount.GetHighestDunningLevel(HIGHESTDUNNINGLEVELA:="0", Return:=objReturn, HighestDunningLevelD:=objHighestDunningLevelD)
Grateful for a response!
Regards,
Niklas

Similar Messages

  • I am having problems with my music collection, after burning all of my music to the computer I organized it into folders and placed it in the iTunes Folder. Starting on a new computer now. I can get my music from old computer?

    I am having problems with my music collection, after burning all of my music to the computer I organized it into folders and placed it in the iTunes Folder. As of now i realize this was a mistake. Starting on a new computer now. I cant get my music to transfer from the itunes folder on the old computer? I keep getting error "Can't Read from the source file or disk." Whenever I got to folder properties its always checked read only. But when i play the song it works just fine. Im sure this is just because I added music into itunes folder but is there anyway to fix it?

    WMA files are 'window media audio' files, which is a Microsoft format. If you want to add them to your iTunes library on your Mac then you will need to convert them into a compatible format first. If you still have your windows machine then iTunes for Windows can convert them from WMA to MP3 format : https://discussions.apple.com/message/24158701#24158701
    Or try a search for, for example, 'convert wma to mp3' to find programs to convert them.

  • Problem with switching tabs in top level navigation for Roles

    Hi,
    I've created two tabs (based on two roles) in the portal top level navigation menu. When clicking the first one it opens as it should. Then when clicking on the second tab it will not open, instead the first tab open up again, it sort of switches back automatically.These  two roles  are  basically consists of worksets and iviews(accessing to r/3).
    Does anyone have any expericene with this type of problem?
    please  suggest me
    Thanks
    Aravinda

    Hi Aravinda
    Please check this link
    Re: Problem with switching tabs in top level navigation
    Regards
    Geogi

  • Problem with mutiple BAPI calls during the commit

    Hi all,
    I am trying to create accounts for a given partner i the transaction F9K1 using the BAPI BAPI_BKK_ACCNT_CREATE. After calling the BAPI I am committing it too.
    The problem is if I try to create multiple accounts like RCA, ACA, MCA, IOE and so on, the first time the BAPI is called to create RCA account it is successful an it is even committing. When I call the BAPI to create the the ACA account the return table from the BAPI shows success message but the commit fails. If I restart the program and try creation of accounts now the RCA will throw a error msg saying account already exist, ACA account will be created and then the MCA account creation fails in the same manner explained above.
    I see the issue is with multiple BAPI calls and I tried using all sort of methods like clearing buffers, start new task in local and wait command and all.  But none of them seems to be working for me.
    Can anyone please guide me on how I can overcome this problem.
    Thanks.

    BAPI :
    BAPI BAPI_BKK_ACCNT_CREATE
    Functionality
    Use this method to create an account in Bank Customer Accounts. This method returns the following values:
    Identification details for the newly created account such as the internal and the external account number, and the bank area details
    A table containing error messages
    To create an account by using this method, you must specify values for the import parameters Bank Area (BANKAREA) and Product (PRODUCTNAME).
    Note: You must also specify a value in the External Account Number (EXTERNALACCOUNTNR) parameter if you have defined an external number range for the bank .
    REgards,
    Jayan.

  • Problem with Back button in Top Level Navigation

    Hi all,
    We are facing a minor problem with the Back button in the Top Level Navigation in Portal. This button is present under the Roles and Worksets menu along with the History, Forward, and Add to Portal Favorites links.
    The problem is faced when we have some worksets under a single role. While browsing accross these worksets by randomly clicking on them, we wish to use the Back button as well to go back to the previous workset. But when we use the Back button, the Detailed Navigation panel in the last workset is not retrieved.
    I will explain with the System Administration Role. I open the worksets under this role in the following manner:
    First I open Transport;
    Next I open Portal Display;
    Next I open System Configuration;
    Now I wish to go back to Portal Display workset by clicking on the Back button. But when I do this, although the Portal Display workset opens up, but I cannot see the Detailed Navigation Panel. See the screenshot below:
    http://img399.imageshack.us/my.php?image=backbuttonkg6.jpg
    Please help me in solving this issue.
    Regards,
    Ankur

    I think I have found a resolution, although not very pleasant:
    [Note 950426 - Portal Back button not working correctly|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_ep_pi/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d393530343236%7d]
    Regards,
    Ankur

  • Problem with video garbage collection

    I have problem with a cummulative memory issue. I have developed an air application that reproduces video when it is needed. Although my air process (myAir.exe) uses the same ammount of memory for days (stable, illustrating lack of development memory leak problems) the total system memory increases every time a video is being reproduced. Every time the video is stopped the memory used by this video is released but not completely resulting to a continuously increasing system memory. Is this a graphics card problem, an OS graphics garbage collection problem or an air development problem! Has anyone ever had a similar problem? Every response would be helpful.
    Thank you in advance.

    Just a question ..??.. as a result of this dbconn getting freed before method ends , are you getting resultsetclosed error ?..

  • Problem  with Fonts for my Dunning form using SO10

    Hello Gurus,
    I have developed a Form for Dunning and have assigned 2 different standard texts (using SO10) for 2 dunning levels and I assigned the same paragraph format for both.(in my case P5 is paragraph format). I am using the same printer to print both the forms but the <b>font on the printout is different for both</b>....
    Could you please tell me what might be the reason for it and how do i resolve it?
    Thanks in Advance
    Ravi

    Hi..
    When u r using the <b>INCLUDE TEXT</b>..
    and if you are using the <b>STYLES</b> then the style formats will be applied to the <b>FIRST INCLUDE</b> onli..
    for the <b>second INCLUDE</b> the default format of the <b>FORM</b> will be applied..
    After first INCLUDE implicitly the STYLE FORMATS will be switched of..
    again Include the style after the first include .. then u will get the required output !!
    <b>
    reward if it helps u..
    sai ramesh</b>

  • Problem with a bapi fm...

    hi all,
    i have a problem with Bapi_goodmvt_create.
        CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
          EXPORTING
            goodsmvt_header  = gt_header
            goodsmvt_code    = gt_bapigm_code
            testrun                 = 'X'
          IMPORTING
            goodsmvt_headret = gs_headret
          TABLES
            goodsmvt_item    = gt_item
            return                 = gt_return.
        IF gt_return-type <> 'E'.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
        ELSE.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
        ENDIF.
    in the error table gt_return iam getting,
    while running in the test run mode no errors are comming. but while running test run mode immediately iam getting the below error, but i havent opened the plant or material anywhere,
    "The plant data of the material 801187 is locked by the user PREM."
    help me in this issue,
    Thanks,
    Prem.

    Use WAIT for 5 seconds before COMMIT. It may work.
    Regards,
    Amit
    Reward all helpful replies.

  • Strange problem with Outlets and Collection View Items

    This is a strange issue. I am using XCode 3.2.2 and I am building a Collection View. To do this I have a non-document based application that uses Core Data.
    *Collection View Item Class*
    I created a new class that inherits NSCollectionViewItem and built it to have an outlet to the Label.
    *Collection View Item NIB*
    I created a Empty NIB for my Collection View Item. To the NIB I added a Custom View object and set the Class Identity to NSBox. I then added a Label to the new NSBox. I changed the File Owner to the new class and connected the "view" outlet to the new NSBox and the Label to the label outlet.
    *Main Menu NIB*
    I added a new NSCollectionViewItem object to the Main Menu NIB and set the Class Identity to the new class mentioned above. I then set the NIB Name to the name of the NIB mentioned above. In the window I added a NSCollectionView then set its Item Prototype to the new NSCollectionViewItem object I just configured. This is the typical way to set up a collection view with its item in a different NIB.
    *Back to the problem*
    Everything seem to work well except that in the setRepresentativeObject in the Collection View Item class when it attempts to set the Label to a value. Nothing happens. When I check closely I find that the Label is coming back nil. It is properly linked. I deleted everything and rebuilt the collection view item and relinked everything without success.
    *How I made it work but not happy with it*
    I have finally made this work by simply putting the line "[self view];" just before I attempt to run "[label setStringValue:name];". If I remark out the "[self view];" the label returns nil. I have a note near the line to make it easier to spot. It seems that I should not need to access the superclass's "view" accessor just to access one of view's subviews. Is this a bug or have I written this wrong?
    The Collection View Item code is below. Any help is appreciated.
    Thanks,
    Rob
    #import <Cocoa/Cocoa.h>
    #import "PersonManagedObject.h"
    @interface PersonSelectionViewItem : NSCollectionViewItem {
    NSTextField *label;
    #pragma mark Finalizers
    - (void)dealloc;
    #pragma mark Outlets
    @property (nonatomic, assign) IBOutlet NSTextField *label;
    #pragma mark Instance Methods
    - (void)configureKeyValueObserving;
    - (void)removeKeyValueObserving;
    #pragma mark Overrides
    - (void)setRepresentedObject:(id)representedObject;
    - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context;
    @end
    #import "PersonSelectionViewItem.h"
    @implementation PersonSelectionViewItem
    #pragma mark Finalizers
    - (void)dealloc{
    [self removeKeyValueObserving];
    [super dealloc];
    #pragma mark Outlets
    @synthesize name;
    #pragma mark Instance Methods
    - (void)configureKeyValueObserving{
    PersonManagedObject *person = (PersonManagedObject *)[self representedObject];
    [person addObserver:self forKeyPath:@"lastNameFirstName" options:0 context:NULL];
    - (void)removeKeyValueObserving{
    PersonManagedObject *person = (PersonManagedObject *)[self representedObject];
    [person removeObserver:self forKeyPath:@"lastNameFirstName"];
    #pragma mark Overrides
    - (void)setRepresentedObject:(id)representedObject{
    [super setRepresentedObject:representedObject];
    NSString *personName = (NSString *)[representedObject valueForKey:@"lastNameFirstName"];
    [self view]; //<---Without this line the "label" variable 2 lines down will be nil.
    if (personName) {
    [label setStringValue:personName];
    [self configureKeyValueObserving];
    - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{
    if ([keyPath isEqualToString:@"lastNameFirstName"]) {
    [[self label]setStringValue:[object valueForKey:@"lastNameFirstName"]];
    } else {
    [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
    @end

    I think you must be correct. I just ran into the problem again in yet another NIB. It was in the setRepresentedObject method. I simply put in the same line "\[self view\]" just before I needed to set the value of the view component and it worked again. If it is the same in other components I guess I just need to pay attention to it. Thanks for the information.
    Message was edited by: Cycles4Fun

  • Problem with Embedded Files/Collections

    I have written a Pdf file (fragments below) to act a container to other pdf's. Initialy it all looks good, however when I click on the embedded file inside Acrobat Reader instead of displaying the contents I get a thumbnail of the acrobat logo with the Open and Save options underneath. If I click open it opens a new Reader window with the container file displayed again, not the embedded file. However if I click save it saves the embedded file down to disk correctly.
    How can I make it so that when the file is clicked in the attachments window it opens directly into the main reader window?
    5 0 obj
    <<
    /Params <<
    /Size 5298
    /ModDate (D:20081002163423+01)
    /CreationDate (D:20081002163423+01)
    >>
    /Length 5298
    /Type /EmbeddedFile
    /Subtype /application#2Fpdf
    >>
    stream
    endstream
    endobj
    6 0 obj
    <<
    /Type /Filespec
    /EF <<
    /F 5 0 R
    >>
    /F (Options Report.pdf)
    /Desc (Options Report)
    >>
    endobj
    7 0 obj
    <<
    /Type /Catalog
    /Pages 8 0 R
    /OpenAction[4 0 R /Fit]
    /Names << /EmbeddedFiles 9 0 R >>
    /Collection <</Type /Collection /View /T>>
    >>
    endobj
    9 0 obj
    << /Names [ (Options Report) 6 0 R ]
    >>
    endobj

    Leonard, I have uploaded the completed file to http://forum.planetpdf.com/webboard/wbpx.dll/~planetpdfforum/read?167447,3
    I could not see how to upload files to this forum.
    As stated above the file opens in Acrobat Reader v7 to the cover page, and allows the embedded files to be opened in seperate application windows, as it does in version 9. However under Acrobat Reader v8 when an embedded document is opened it just re-opens at the package level, not the embedded doc.
    Thank you in advance if you can look at this.

  • Problem with an empty collection

    When a procedure executes
    FOR i IN g_tabla_situacion.FIRST..g_tabla_situacion.LAST
    LOOP
    END LOOP;
    and g_tabla_situacion has no elements, ORACLE returns a
    "*-6502:ORA-06502: PL/SQL: numeric or value error*"
    How can I avoid this problem?
    Now I am doing...
    IF ( g_tabla_situacion.COUNT > 0 ) THEN
    FOR i IN g_tabla_situacion.FIRST..g_tabla_situacion.LAST
    LOOP
    END LOOP;
    END IF;
    but it doesn't seem the best solution...
    Thanks.
    Edited by: pacoKAS on 19-feb-2010 0:34

    pacoKAS wrote:
    I was thinking in a solution that forces g_tabla_situacion.LAST to be lower than g_tabla_situacion.FIRST when I load g_tabla_situacion with no registers....Not sure what you mean, but if your collection is not dense (as in only these indexes are present: 1 - 2- 5) you will get an exception. The method that I showed you will always work correctly, regardless if the collection is Sparse (containing gaps) or if the collection doesn't contain any entries.

  • Problem with the bapi.

    hi ,
    i transfered legacy data to sap system using bapi.
    for that i used salesorder creation bapi.
    'BAPI_SALESORDER_CREATEFROMDAT2'.
    it is uploading my header data and item data .
    even it set the values correctly.
    but the above rfc not creating saledocument.
    where i did mistake pls rectify my problem.

    hi michel i agree with u. i called 'bapi_transction_commit' first
    after than i called bapi_saleorder_createformdat2.
    i checked in debugging modein that function module.
    it gives sy-subrc 4 for the below statement
    fbgenmac 'BAPI_SALESORDER_CREATEFROMDAT2'.
    how i will rectify this problem.
    do u want the code.
    i will send my code.
    Edited by: kartik p on Sep 22, 2008 5:00 PM

  • Problems with running BAPI   BAPI_SALESORDER_CREATEFROMDAT2

    Hi all,
    I’ve got a problem running BAPIs in SD invironment.
    I’m creating contract releases in SD via BAPI.
    First I run BAPI BAPISORDER_GETDETAILEDLIST in my program to get detaildata of the contract.
    Then I run the BAPI   BAPI_SALESORDER_CREATEFROMDAT2 filled with contract reference data and in addition with order data to create the contract release.This works properly so far. On both sides in the contract and in he contract release I find the correct document flow. Means: in document flow of the contract I find all the releases created . Also I find the contract in the documentflow of the releases.
    But…something does not work: In the contract the released values are not updated. When I create a release manually, the release values are accumulated  in the contract in field  ‘value released’ under flag ‘item detail’. But this does not work, when the leases are created via BAPI. However I checked several parameters in the BAPIS but I cannot find something that leads to an update .
    Can somebody help me and can tell me what is to be done to get this field updated? Thanks in advance.
    same in German...
    Ich habe ein Problem mit BAPIs im SD.
    Ich erzeuge Abrufe zum Kontrakt im SD mittels BAPIs.
    Zuerst lasse ich den BAPI BAPISORDER_GETDETAILEDLIST laufen, um mittels Kontraktnummer alle Daten zum Kontrakt zu bekommen. Dann lasse ich den BAPI   BAPI_SALESORDER_CREATEFROMDAT2 gefüllt mit SD-Abrufdaten und den Referenzdaten des Kontraktes laufen Dies funktioniert soweit sehr gut. Sowohl im Kontrakt als auch im Abruf sind jeweils die übergeordneten bzw. untergeordneten Vertiebsbelege zu sehen. Die Referenz wird also hergestellt. Jedoch wird im Kontrakt nicht die Abrufwerte aufsummiert. Normalerweise wird bei manueller Erstellung der Abrufe im Kontrakt die jeweilgen abgerufenen Werte gegen den Kontraktwert aufsummiert (Feld abgerufene Werte im Kontrakt unter Reiter ‚Positionsdetail‘. Ich habe alle möglichen Parameter im BAPI geprüft und getestet aber nichts gefunden, was mir die abgerufenen Werten aufsummiert.
    Kann mir dazu einen Tip geben, was ich tun kann, damit auch die Werte richtig referenzieren ? Danke im Voraus.

    the usage of exactly this BAPIs in the way I described  is in according to SAP note 370988.
    BAPI_SALES_DEL_SCHEDULE_CREATE ist for SD schedule agreements and not for SD contracts and does not offer Input parameters for e.g.  adding price conditions what is needed for my task.
    The field in contract I mentioned e.g. in Transaction VA42 VA43 is filled / gets its Information out of Infostructure/table S135. The BAPI seems not be able to fill this structure while creating the contract release.
    I'm looking for example an input parameter I did not found already or any other option that leads to an update of infostructure S135 while creating/posting a release via BAPI.

  • Problem with automatic table of contents Level headings

    I am having trouble with the Table of contents in Adobe Indesign. When I create my automatic table of contents one of the Level headings that is supposed to appear under Chapter 1 instead appears under the Introduction heading. On the actual page where the heading paragraph styles have been defined the 2nd Level heading is as it should be underneath Chapter 1. So what I end up having to do is move them manually in the TOC. But I don’t want to have to do this and it would be great if Indesign instead did the automatic table of contents correctly.
    I wonder if it has anything to with the fact that our template is set up with headings (that sit outside the body text to the left) as text boxes which we place inside the main body text box (they have anchored object settings on them so the heading sits off to the side).  Whilst the anchored text box is exactly in the right sequence, maybe indesign senses and reads the anchored text box last?
    I have an example of the file and the problem that is occurring in the pdf, it can be downloaded from:
    Is there a solution to this?  If anyone has any ideas I would be very grateful.

    I've been playing with this for a while, and quite honestly I don't understand why it's doing things the way it is. It's working correctly on Page 11, which seems to me to have exactly the same structure, except for the subtitle. It also works correctly if I copy the frames from page 14 and paste into a new doc.
    Things I tried that did not work: Export as .inx and move the pages to a new doc. You might try copying the text and pasting into a new doc.

  • Problem with switching tabs in top level navigation

    Hi,
    I've created two tabs (based on two roles) in the portal top level navigation menu. When clicking the first one it opens as it should. Then when clicking on the second tab it will not open, instead the first tab open up again, it sort of switches back automatically.
    Does anyone have any expericene with this type of problem?
    Best regards, Olof Trönnberg

    Hi George
    On startup of the role an iview was called which opened a gif file stored in the KM. This iview wasn't added to any page so I basically did just that; added it to a page. Now the problem seems to have gone away!
    Thanks!

Maybe you are looking for

  • Problems in Domain Creation of Weblogic Integration 8.1

    Hi, I am trying to create a domain in WLI 8.1 on Solaris machine. I am creating the domain by running the script config.sh in bea/weblogic81/common/bin directory. But it is creating the domain with default two conection Pools both pointing to PointBa

  • How to post goods receipt without FI document number

    Hi friends, Is it possible to create a Good Receipt without creating any FI document number? Regards, G G Reddy

  • No Accounting doucment for Vendor invoice.

    Hi Gurus, We have following issue: Created a Purchase order. GR and IR completed for that. However when check the accounting document for Invoice, it gives error message : No subsequent document found in Accounting Long text of error message also att

  • Problems with import/export vcards.

    Hi everybody. I'm facing a strange problem. Some of my contacts (approx 200) vanished surprisingly (I use iCloud). I tried to restore them with Time Machine. But Address Book is simply not doing it! Going back in time with Address Book and restore is

  • Clearing out full HD

    Hello, I have been perusing the answers for a full HD, and have a question. Here's the particulars. I have 74GB in use and 197.67 mb available I have mostly photos and some music on my computer- no movies... In looking at the break-down of the files-