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

Code amendment

Can someone help me amend the following so that the result adds the last value which was stored? Thanks

***********

  • Please check Processkeys needs to consider!

***********

IF COMM_STRUCTURE-cpquabu <> 0.

  • INFLOW

IF ( COMM_STRUCTURE-processkey EQ '100' "Other Issues

OR COMM_STRUCTURE-processkey EQ '101' "Returns / Vendor

OR COMM_STRUCTURE-processkey EQ '104' "Material Transfer

OR COMM_STRUCTURE-processkey EQ '105' "Stock Adjustment InvD

OR COMM_STRUCTURE-processkey EQ '106' "Stock Adjustment Other

OR COMM_STRUCTURE-processkey EQ '110' ) "Issues from Stock Transfers

AND COMM_STRUCTURE-cppvlc <> 0.

RESULT = COMM_STRUCTURE-CPQUABU * -1.

  • OUTFLOW

elseif ( COMM_STRUCTURE-processkey EQ '000' "Other Receipts

OR COMM_STRUCTURE-processkey EQ '001' "Goods Receipt / Vendor

OR COMM_STRUCTURE-processkey EQ '004' "Material Transfer / Receipt

OR COMM_STRUCTURE-processkey EQ '005' "Stock Adjustment InvD

OR COMM_STRUCTURE-processkey EQ '006' "Stock Adjustment Other

OR COMM_STRUCTURE-processkey EQ '010' ) "Receipt from Stock Transfer

AND COMM_STRUCTURE-cppvlc <> 0.

RESULT = COMM_STRUCTURE-CPQUABU.

ENDIF.

ENDIF.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 11:50 AM

    Hi Niten,

    I guess you need to declare a field lets say zstatic of static type and then the code would be like this:

    STATICS: ZSTATIC. " Data Declaration

    ZSTATIC = ZSTATIC + COMM_STRUCTURE-CPQUABU.

    RESULT = ZSTATIC.

    Bye

    Dinesh

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Dinesh,

      Thanks for that, I think the problem is an oversight since the current quantity is loaded from the BX extractor and the BF will just be movements so I will still not get correct. Will try something else in the meantime. Have awarded points

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 09:51 AM

    Hi Niten,

    Not sure about this. But you can give it a try:

    RESULT = RESULT + COMM_STRUCTURE-CPQUABU.

    Bye

    Dinesh

    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.