2016 Mar 21 10:24 PM
If customer account is no longer a PV account, need to not select it this table.
SELECT gpart vkont
FROM DFKKOP
INTO CORRESPONDING FIELDS OF TABLE int_pv
WHERE hkont = '0000121030'.
I have a program that is selecting the accounts that were Photovoltaic (PV) but are not longer. How can I let it not select if the account is no longer a PV account?
If customer account is no longer a PV account, need to not select it this table.
SELECT gpart vkont
FROM DFKKOP
INTO CORRESPONDING FIELDS OF TABLE int_pv
WHERE hkont = '0000121030'.
I have a program that is selecting the accounts that were Photovoltaic (PV) but are not longer. How can I let it not select if the account is no longer a PV account?
2016 Mar 22 1:04 AM
Hi,
You need to restrict the selection to those accounts that are not "PV". If this attribute field cannot be found in DFKKOP, it can probably be found via an inner join to table FKKVK.
I'm guessing you can tell if an account is PV by their VKTYP value (Contract Account category)?
cheers
Paul
2016 Mar 22 2:28 PM
That I understand but how can the program be written to be not selecting the account if it was PV and is no longer PV? IF statement?
2016 Mar 22 3:59 PM
2016 Mar 22 4:15 PM
These are existing accounts and there is a report that is submitted but it keeps selecting the accounts that were PV but are no longer PV by this it's still pulling the amounts from the account into the aging report. I need to configure the program to not select the accounts that were PV but I am lost of how to complete this.
2016 Mar 22 4:22 PM
2016 Mar 22 4:52 PM
The accounts are identified from DFKKOP-GSBER "Business Area" The Solar accounts are "400" and they use to be under Solar but are no longer but the program is still selecting the old accounts. Thanks.
2016 Mar 22 6:08 PM
OK - what exactly do you mean by "accounts"? Is it the contract account item? If so, how is the business area changed?
Or is it the GL account?
Something else?
Rob
2016 Mar 22 6:22 PM
2016 Mar 22 10:06 PM
I figured it out.
SELECT gpart vkont
FROM DFKKOP
INTO CORRESPONDING FIELDS OF TABLE int_pv
WHERE hkont = '0000121030'
AND vkont in s_vkont
AND AUGST EQ space.
2016 Mar 23 12:16 AM
Hi,
All that extra line does, is restrict the selection to open items. That has nothing to do with account type at all. You may want to reconsider.
And really, after al those people tried to help you, you didn't consider any of the replies above to be 'helpful' or "correct" (except your own?)
cheers
Paul
2016 Mar 23 3:56 PM
I'm with Paul on this. I don't see how the change to your SELECT will help.
Additionally, the business area is just a default on the GL. It can be changed by the user at data entry time.
Rob
2016 Mar 23 5:52 PM
The accounts use to be with PV but they are not longer under PV and the aging report is still picking up the amounts from the closed PV account. I ran a debug on the program and found that the account is RES and then move the account back to PV.
FORM UPDATE_PORTION_MRU_CLASS.
int_output-portion = int_eanlh-portion.
int_output-termschl = int_eanlh-ableinh.
CASE int_eanlh-aklasse.
WHEN 'COM'.
int_output-z_acctclass = 'COMM'.
WHEN 'IND'.
int_output-z_acctclass = 'IND'.
WHEN 'RES'.
int_output-z_acctclass = 'RES'.
ENDCASE.
READ table int_pv with key vkont = int_dfkkop-vkont.
IF sy-subrc = '0'.
int_output-z_acctclass = 'PHTV'.
ENDIF.
ENDFORM. " UPDATE_PORTION_MRU_CLASS
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |