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

Add Additional Invoice Lines on A/R Invoice System Form

Hi,

I have a scenario where I have to check through the lines of an AR Invoice when the user clicks Add on the AR Invoice System Form( Form 133) and I have to check the following before the Invoice is added.

1) Parse through each line on the AR Invoice form and check if any line has Discount % NOT Equal to Zero.

2) If criteria above is met, then add additional lines need to be added to the Invoice before it is saved.

I understand how to capture the Add button on A/R Invoice is clicked when BeforeAction = true.

I would like some help on how to

1) Parse through Item Lines to check if Discount % is not Zero

2) How to add additional lines before Invoice is Saved.

Any source code you provide would be helpful.

Thanks,

Krishnan

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Nov 13, 2012 at 11:28 AM

    Hi Khrisnan,

    On before item pressed,

    1. Get the matrix item 38 if this is an item type invoice.

    Dim oMtx as SAPbouiCOM.matrix = form.items.item(38).specific

    ' loop each line of the matrix

    For i as integer=1 to oMtx.rows.count

    'check the value

    If oMtx.GetCellSpecific("coluid",1).value=0 then

    Replace the col uid with the column uid of the discount. I dont have sbo with me now, so i cannot check.

    2. To add new line simply

    oMtx.GetCellSpecific("itemcoluid",oMtx.rows.count).string= "item code"

    Regards,

    Edy

    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.