I'd like to share one success case (FSCM) Liquidity Planner
How you can to derive liquidity item when you have one down payment like your Sales order or Purhase order?
1-)Sales Order
TCODE F-37
When I have a request for down payment ,
insert in the Field BSEG-VBELN the (Sales Order number "269")
Tcode F-28 - register the payment.
When I load the document in report
RFLQ_CASH_FORECAST_FIN, the document goes to Buffer, because the account G/L Special leave for one generic account for all down payments, but I need derivate the liquidity item by future account order.
The billing and account will be happen only after when incoming invoice, because account principles.
TCODE - VKOA - You have the key account that Sales order will be accounted
TCODE - FLQINFACC - Account is the same account VKOA as below.
When you do a request for down payment
(F-37) you need to insert the SPECIAL G/L as "A" , and also insert the SO number in the some request for down payment. The solution is apply the NOTE 2346570 below.
______________________________________________________________________
2) PO Scenario.
TCODE - ME21N - Create purchase order.
TCODE – F-47 Payment across down payment vendor
*Note, the PO number insert in the document
TCODE - F-53 Down Payment Released
When you load the document in
RFLQ_CASH_FORECAST_FIN, the document goes to the buffer also because the like reasons, Special G/L in down payment.
You need to insert in the account type "S"
TCODE - FLQINFACC Configuration that’s correct buffer!
The objective is like the scenario SD-Sales. I want to use the PO number – (BSEG-EBELN), and then find the account assignment the PO for to find the liquidity item.
Solve this as below;
And apply the code function module
ZFLQ_SAMPLE_REDUCE_DOC
PERFORM DP_PO_ACCOUNT TABLES T_BSEG
CHANGING P_SUBRC.
PERFORM DP_SO_ACCOUNT TABLES T_BSEG
CHANGING P_SUBRC.
The code for above subroutines as follows:
FORM DP_PO_ACCOUNT TABLES C_T_BSEG STRUCTURE BSEG
CHANGING P_SUBRC.
DATA:L_T_BSEG LIKE BSEG OCCURS 0 WITH HEADER LINE,
L_HKONT LIKE BSEG-HKONT.
FIELD-SYMBOLS: <BSEG> LIKE BSEG.
L_T_BSEG[] = C_T_BSEG[].
LOOP AT L_T_BSEG ASSIGNING <BSEG> WHERE KOART = 'K'
AND EBELN <> SPACE
AND EBELP <> SPACE
AND AUGBL = SPACE.
CALL FUNCTION 'FLQ_MM_INVOICE_ACCOUNT'
EXPORTING
I_AWKEY = ' '
I_ZEKKN = <BSEG>-ZEKKN
I_EBELN = <BSEG>-EBELN
I_EBELP = <BSEG>-EBELP
* I_XREF3 =
IMPORTING
E_SAKTO = L_HKONT
* EXCEPTIONS
* NO_RBCO = 1
* INCOMPLETE = 2
* OTHERS = 3
.
IF SY-SUBRC = 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
<BSEG>-HKONT = L_HKONT.
P_SUBRC = SY-SUBRC.
ENDIF.
ENDLOOP.
CHECK P_SUBRC = 0.
C_T_BSEG[] = L_T_BSEG[].
ENDFORM. " DP_PO_ACCOUNT
FORM DP_SO_ACCOUNT TABLES C_T_BSEG STRUCTURE BSEG
CHANGING P_SUBRC.
DATA:L_T_BSEG LIKE BSEG OCCURS 0 WITH HEADER LINE,
L_HKONT LIKE BSEG-HKONT,
L_FLQITEM_SO TYPE FLQITEMSO_FC.
FIELD-SYMBOLS: <BSEG> LIKE BSEG.
L_T_BSEG[] = C_T_BSEG[].
LOOP AT L_T_BSEG ASSIGNING <BSEG> WHERE KOART = 'D'
AND VBEL2 <> SPACE
AND POSN2 <> SPACE
AND AUGBL = SPACE.
L_FLQITEM_SO-AWREF = <BSEG>-VBEL2.
L_FLQITEM_SO-AWPOS = <BSEG>-POSN2.
PERFORM SDOR_ACCOUNT(RFLQ_CASH_FORECAST_SDSO)
CHANGING L_FLQITEM_SO.
IF NOT L_FLQITEM_SO-HKONT IS INITIAL.
<BSEG>-HKONT = L_FLQITEM_SO-HKONT.
P_SUBRC = 0.
ENDIF.
ENDLOOP.
CHECK P_SUBRC = 0.
C_T_BSEG[] = L_T_BSEG[].
ENDFORM. " DP_SO_ACCOUNT
___________________________________________________________________________
The result is independent if was payed across down payment,
I have the payments in correct Liquidity Item the intial document
I hope to help us!
Best Regards