Skip to Content
author's profile photo Former Member
Former Member

Loop through matrix before document saved (or get doc number after save)

Hi All,

I would like to loop through the matrix of a document (e.g. an invoice) before it is posted to the database (when the add button is clicked), but I would like to know at that point whether the invoice will definitely be posted. When you look at ActionSuccess, the items in the matrix are already cleared.

Alternatively I would like to get the number of the invoice that was added so I can loop through the invoice lines records in SQL.

I have looked at quite a number of posts on tjis forum, but none of them has a definite answer to either of the options - or none I could find at least 😊

Your help is appreciated and thanks in advance,

Adele

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2005 at 03:39 PM

    Hi Adele,

    To get the number of the invoice I used the following code. As you will see the user has already pressed the "add" button. I think at this point you can still loop through the matrix. Give it a shot!

    Regards,

    Felipe

    If pVal.ItemUID = "1" And pVal.BeforeAction = True Then

    Dim oEditText As SAPbouiCOM.EditText

    oForm = B1_Application.Forms.Item(FormUID)

    oItem = oForm.Items.Item("8")

    oEditText = oItem.Specific

    lORDRNum = CInt(oEditText.String)

    End If

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.