Subfile code for AS/400

560 pts.
AS/400 Subfiles
In Subfile,

OPT   ShipQuantity   QuantityToShip   Item#   CustomerOrder#        ___     ____________   100                  ABC1     CO100010                 ___     ____________   10                    WQE1    CO100010               This is my SFL Records, Here 2 items,same CustOrder, Qty to ship is 100 & 10,So user can give SHIPQTY <=100 for item(ABC1) and second item wqe1 as SHIPQTY <=10 Selling Price is 100...

I have entered 5 for first item(ABC1) and 5 for second item(WQE1)... After i give these values,i m displaying another screen and coming back here to this subfile....

Now if i press F2,it should calculate as Temp=(5*100)+(5*100) so Temp = 1000... But without pressing F2 if i changes values ie in SHIPQTY for both items , say as I have entered 3 for first item(ABC1) and 1 for second item(WQE1)... Now if i press F2,it should calculate as Temp=(3*100)+(1*100) so Temp = 400...

but  i am getting as Temp = 1000 + 400= 1400... How to resolve this... if i change the value,the previous value shud get erased.. so oly it will work...but how the code is... Pls rep as soon...

Software/Hardware used:

Answer Wiki

Thanks. We'll let you know when a new response is added.

OPT :____
ShipQuantity : ________
QuantityToShip :100
Item# :ABC1
CustomerOrder# :CO100010

OPT :____
ShipQuantity : ________
QuantityToShip :10
Item# :WQE1
CustomerOrder# :CO100010


Discuss This Question: 6  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Koohiisan
    I think we need to see pertinent portions of the source code that does your calculations in order to really answer this question properly. Be sure to format using the 'code' style! I always forget! ;)
    5,045 pointsBadges:
  • CharlieBrowne
    Be sure to put in your DDS as well as your RPG code for us to figure it out. First though, you should used DEBUG to step through your code to see what is happening.
    62,385 pointsBadges:
  • 22917
    actually its a project modifications, SomeBody'S logic,if i got this answer i can move on to next step,so only
    560 pointsBadges:
  • TomLiotta
    Without seeing the code, we probably can't say much more than to stop accumulating the values each time; clear (initialize to zero) the summary variables before reading the subfile. Tom
    125,585 pointsBadges:
  • The Most-Watched IT Questions: May 17, 2011 - ITKE Community Blog
    [...] 4. Koohiisan, CharlieBrowne, and TomLiotta did their best to help with one member’s subfile code for AS/400. [...]
    0 pointsBadges:
  • pdraebel
    Looks like the value of TEMP should be reinitialised before processing the changes in the subfiles again and recalculating the TEMP value. If the first time you do a READC to the Subfile to calculate the value, you should update the subfile record with the SFLNEXTCHG indicator on. That will insure that you will READ all values entered in the subfile again, even if they are not changed by the user.
    7,545 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: