FICO - Raghav - 2018-01-01 - WSSAP-23- Spec - ABAP - Ecom and Retail Sales program to capture discount and returns GL postings (Pragnya by 2018-03-31) #FIOutgoingInvoices #FIAR #wipdoc

SPECIFICATIONS

WSSAP-23-Spec-ABAP - SAP program to capture Ecom and Retail sales related postings


Purpose


ABAP - SAP program to capture sales related postings

Admin Info


Purpose
ABAP - SAP program to capture sales related postings
Spec Created By
Raghav
Spec Created Date
06/28/2017
Spec QA by
Raghav
Objects

Document Status
WIP


Estimates



Sl.No
Activity
Estimation in Hours
1
Research
08
2
Documentation
08
3
Development/ Config
30
4
Unit test in DEV
30
5
Unit test in QUA

6
Other activity


TOTAL


References


Prior Tickets

[Provide links of prior associated Spec / Break Fix BOSS document(s)]
  1. FICO - Raghav - Damodhier - 2017-06-28 - 44153 - Spec - ABAP - SAP program to capture sales related postings (Baiwa by 2017-10-15)

Documents

[Attach any document(s) received for the requirement(s)]

0011_20170730_0500_ECOM_Sales.TXTSales journal entry program.docx


Spec Changes


[List the changes made to program after the approval of the original requirement along with the Date on which the change request was received and the name of the initiator]

Sl.
Change Details
Requested By
Requested On
Notes if any
1
Add AL11 Path /usr/sap/NED/ECOM/
Baiwa
07/13/2017

2
Increase the length 4 to for subsidiary and store id fields
Baiwa
07/24/2017

3
Send the error records in file to LOG folder
Baiwa
07/24/2017

4
Send the email notification if the file have errors
Baiwa
07/24/2017

5
Add posting date in input screen
Baiwa
07/24/2017

6
Change Inventory GL to 211310
Baiwa
08/23/2017

7
Add new freight GL in total AR and posting date logic
Pragnya
08/25/2017

8
Summarize records with order ID first
Pragnya
08/25/2017

9
Stop posting to COGS and Inventory for specific customers
Baiwa
09/21/2017
New sub task created 59166
10




Functional Requirement


Purpose/WHY:

[Explain the purpose of the project and the reason why this requirement has come]

Business Requirement
Retail sales are recorded in POS system and flow into BW system. These sales need to be recorded in SAP journal entries to capture retail revenue, accounts receivable, royalty, tax, sales related inventory and cost of goods sold and inter-company know-how charge if applicable.
Assumptions
In order for this process to work, the following assumptions have been made:
  1. We will be receiving input files from BW in desired format
  2. Each retail store or ecom storefront will have individual SAP customer number which only accepts one currency


In Scope:

[List the activities to be included in scope]

Out of Scope:

[Out of scope activities]

Solution Summary


[Discuss this section with Requester and get approval prior to beginning work]


A customize SAP program is needed to read input file from BW and create journal entries in SAP.The program should create one journal entry per store for the given period’s Retails/Ecom Sales. Each journal entry will have different cost center and profit center assignment based on the customer number. Document type should be SA, and the Reference field should show the Reference ID.

Create custom ZFIRGLE
Transaction Category
Subsidiary
Store ID
Document Type
Company Code
Cost Center
Profit Center
G/L Account
Trading Partner
Movement Type
Offset Account
Gift card
0001
0008
SA
0011

PC3310
0000115020
NE0011


Sales
0002
0001
SA
0021

PC3304
0000115050
NE0021


Inventory
0002
0001
SA
0021
3000HQRTL
PC3304
0000115050
NE0021
2
135140

Create custome program : ZFI_RTL_ECM_SALES
Field in File
SAP Fields
Logic to post invoice from file
Company code
BKPF-BUKRS
Input the company from file
Customer
INVFO-ACCNT
Input customer number from file
Posting Date
INVFO-BLDAT
Invoice Date is Posting date from the input file
Posting Date
INVFO-BUDAT
Posting date from the input file
Reference ID
INVFO-XBLNR
company code(4) + subsidiary(1) + store ID(3)+ MMDDYY(6)+ counter (2)
Net Sales
INVFO-WRBTR
Input net sales from the in amount field
Currency
INVFO-WAERS
Input currency in currency point
UUID
INVFO-SGTXT


ACGL_ITEM-HKONT
Item GL account should be pulled from custom table ZFIRPGLE

ACGL_ITEM-SHKZG
If negative S and if positive H

ACGL_ITEM-WRBTR
item amount VAT, Inventory, royalty,Know how and Brand

ACGL_ITEM-KOSTL
Pull cost center from custom table ZFIRGLE based on company code, subsidary and store ID

ACGL_ITEM-PRCTR
Pull profit center from custom table ZFIRGLE based on company code, subsidary and store ID

ACGL_ITEM-SGTXT
Item text

Note:
Summarize the values in file to post as single entry if the record contains same Customer Number, Currency, Category and UUID


Changes
1. Add AL11 path /usr/sap/NED/ECOM/IN/ in program to automically pick and process all the files having the name 'Sales'.
2. Increase the length 4 of the fields subsidiary from 1 to 4 and store id from 3 to 4 in table ZFIRGLE
3. Send the error records in file to LOG folder - All the processed file should be archived and records with error should be moved to LOG folder with name 'LOG' at ending the file name eg- 0011_20170801_0100_ECOM_SalesLOG
4. Send the email notification if the file have errors and Email must be maintained in TVARVC for the name ZFI_ECOM_NOT_MAIL
Test ID
Test Scenario
Expected Results
FI-001
Sales related posting with single file cocd 0011to run program ZFI_RTL_ECM_SALES in foreground
Sales file should post to customer given in input file with respective GL accounts Net sales (excluding tax),VAT,Total AR,Inventory change, Revenue/Gift card, COGS,Royalty,Know-how and Brand
FI-002
Sales related posting with single file cocd 0011 to run with tcode ZFI_Sales in background
Sales file should post to customer given in input file with respective GL accounts and archive, also the error records should move to LOG folder with adding name LOG at end of the file name.
FI-003
Sales related posting with multiple files with multiple company codes to run with tcode ZFI_Sales in background with posting date
1) All Sales file should pick and process once from AL11 with file name having 'Sales'
2) Archive files once processed, also the error records should move to LOG folder with adding name LOG at end of the file name. 3) Email has to be send if the any file have errors
4)All the processed document should pick the posting date from input field
5. Add posting date in input screen - This should be an optional field in screen and if the posting date entered the program should process all the documents with the given with input else pick from the file.
6. Change Inventory GL to 211310 - Replace the hardcode logic of inventory gl 135132 to 211310
Test ID
Test Scenario
Expected Results
FI-001
Sales related posting run with tcode ZFI_Sales in foreground with posting date for cccd0011
New GL 211310 should be posted instead of Inventory GL 135132 without affecting the other GL entries irrespective of invoice or credit memo
FI-002
Sales related posting with single file run with tcode ZFI_Sales in background for cccd0021
New GL 211310 should be posted instead of Inventory GL 135132 without affecting the other GL entries irrespective of invoice or credit memo
FI-003
Sales related posting with multiple files and company codes run with tcode ZFI_Sales in background with posting date for cccd 0011 & 0021
New GL 211310 should be posted instead of Inventory GL 135132 without affecting the other GL entries irrespective of invoice or credit memo
7. Add new freight GL in total AR and posting date logic - New field freight added in the file and new logic is Total AR=Net sales+Tax+Freight and Posting date should be in posting date field and Document date is pulled fron the file paid date.

8. Summarize records with order ID first - The first summarization – For every order number, the fields COGS, Royalty, Know-how, Brand have to be added up first.
The second summarization – the total file be summarized
Test ID
Test Scenario
Expected Results
FI-001
Sales related posting with single file cocd 0011to run program ZFI_RTL_ECM_SALES in foreground
Sales file should post to customer given in input file with respective GL accounts Net sales (excluding tax),VAT,Total AR,Inventory change, Revenue/Gift card, COGS,Royalty,Know-how and Brand
FI-002
Sales related posting with multiple files with multiple company codes to run with tcode ZFI_Sales in background with posting date
1) All Sales file should first summerize the fields Inventory change,COGS,Royalty,Know-how,Brand,Category,UUID,Order ID based on Order ID and summerize based on customer category and UUID
2) Archive files once processed, also the error records should move to LOG folder with adding name LOG at end of the file name. 3) Email has to be send if the any file have errors
4)All the processed document should pick the posting date from input field and document date from file
9. Stop posting to COGS and Inventory for specific customers - Customer details have to be maintained in TVARVC table with name ZECOM_SALE_CUST_EXC and input data should be cocd(4)+cutomer(10)
for example:- 00110001000180
Test ID
Test Scenario
Expected Results
FI-001
Sales program run to not post COGS and inventory to specific customer for cocd0021
COGS and inventory should not post to account if customer and company code maintained in TVARVC table with name ZECOM_SALE_CUST_EXC
FI-002
Sales program run to not post COGS and inventory to specific customer for cocd0021
COGS and inventory should not post to account if customer and company code maintained in TVARVC table with name ZECOM_SALE_CUST_EXC



Test Plan

[List test scenarios/cases to be executed here]
Test ID
Test Scenario
Expected Results




Solution Details


[Provide complete technical details for configuration or programming here]



Issues


[List Issues / Bugs identified in configuration or development]