Key figures in accounts payable
Hi all,
Can somebody pls explain the below in simple english terms.
1.0credit_lc
2.0debit_lc
3.amount
in 0fiap_c03 cube.Which is the amount paid to vendor,which is the amount to be paid to vendor,balance amount..
There is no routine involved in update rules also and no much info in Help.SAP.com.
Answers will be appreciated.
regards,
Rajendra
Hi...........
As per the accounting rules all expenseses are Debit..........
All Liabilities ie to be paid are Credit...
Paid to Vendor means..........debit in my account and Credit in Vendors account
amount Paid to Vendor >> 0debit_lc
amount to be paid to vendor >> 0credit_lc (Since it is not yet paid...after paid it will be debit.......because accounting follows double entry system......)
balance amount..>> amount
Hope this helps you......
Regards,
Debjani........
Similar Messages
-
SAP Note 0407563: Key Figure Model versus Account Model in BW
I am reviewing a document on Key Figure Model versus Account Model in BW.
There are a number of references to "SAP Note 0407563", can anyone with access to this note post it here for me to review. Sometimes some otf there links prompt for password.
Thanks in advance.Hi,
<b>SAP Note 0407563</b>
Symptom
You would like to design a data model for SEM-BPS and you are not sure, whether to use the key figure or the account model.
You are looking for proposals for data modelling.
Additional key words
bps0, key figure, characteristic, model, data modelling, consultation
Cause and prerequisites
In the following you find a simple example by means of which the terms key figure and account model are defined.
In the example we want to assign several key figures (for example revenues) to a characteristic (for example customer), whose units (for example currency DM) are identical.A modeling option, which is called key figure model, contains all key figures in one data record.
Customer Revenue_1 Revenue_2 Revenue_3
A 10 DM 30 DM 50 DM
In the account model, on the other hand, an additional characteristic is added, which separates the revenue types.
Customer Type Revenue
A 1 10 DM
A 2 30 DM
A 3 50 DM
Advantages and disadvantages from the point of view of data modelling
You can easily add an additional revenue type in the account model, because you do not have to change the data structure.In the key figure model, on the other hand, you must add an additional key figure to the structure.It actually depends on the frequency of these changes occurring.
A data record that is to be changed by a processor, is exclusively locked by SEM-BPS for this processor.A lock that only concerns individual key figures of a data record is not possible.As a consequence the different revenue types can be changed simultaneously by different processors in the account model, wheras in the key figure model one processor automatically locks all key figures exclusively for his own use.
If you use a planning function in the account or key figure model, a different Customizing is required in general. Consequently, a conversion of the data model leads to a change of Customizing in general.
Advantages and disadvantages from the technical point of view
The transaction data is stored in the BW.Analyses have shown that the read time basically depends on the number and not on the size of the data records.In the above example you can see that by changing the key figure and account model the number of records increases by factor 3, which means that you must expect longer read times.When determining the factor you must take into account that normally not all key figures are used in every record in the key figure model.As a consequence only those records are created when changing to the account model, for which the key figures are not equal to zero.
Example:
So if in the above example the key figure Revenue_1 is not used, only two records are generated and consequently the value of the factor is also reduced to 2.
After the transaction data has been read from the BW, it is stored in the application server's memory.The amount of memory required depends, among other things, on the number and on the length of the records.The length can be influenced by the data model you choose:in the key figure model the records are longer than in the account model and therefore consume more memory for each record. Therefore, the key figure or account model will require less memory depending on the relationship between record length and number of records.
When the data model is changed, also the planning functions must be revised.Depending on the type of calculation there might be advantages for one of the models.
Example and rules of thumb
The following example contains 30 key figures, which were mapped to 3 key figures and one additional characteristic with a maximum of 10 characteristic values when you changed to the account model.In both models a price calculation between three key figures each was executed.Consider the specifications in the table as relative specifications:For the number of data records you for example find a and a*10.This means that in the second case the number of data records is larger by factor 10 than in the first case.The determination of the relationships is based on 5000 data records in the key figure model.
Example: all key figures are used (100%)
measured size : Key figure model, Account model
Number data records: a , a*10
Read time : l , l*10
Price calculation: t , t*9
Data record length: d*4 , d
Memory requirement : m , m*3
Example: Key figures are partially used (20%)
measured size : Key figure model ,Account model
Number data records : a , a*2
Read time : l , l*2
Price calculation : t , t*2
Data record length : d*4 , d
Memory requirement : m , m*0,8
How are the sizes determined?
Read the related notes for details on the use of the statistics.
1. a: In the statistics of SEM-BPS or BW this value is stored when you execute a planning function. The method has the name 0-DB1.
2. l: The above statistical record also contains the execution time.
3. t: In the statistics of SEM-BPS a record is stored for the planning function.The overall runtime of the planning function contains the database time. Therefore the database time must be subtracted from the runtime of the planning function to determine t.
4. d: The data record length corresponds to the data structure length (ABAP length), which is generated for every area.The name is made up as follows:
Prefix: /1SEM/_YS_DATA_
Client: mmm
Name of the area: gggggggg
The client must always be specified with three digits, the area only in its actual length.The name for an area called 'MYAREA' which is in client 001 is for example /1SEM/_YS_DATA_001MYAREA.When you determine the length, note that there is the dictionary and the ABAP length (Transaction SE11 => Extras => Structure width => ABAP length) and that the total of the two structures contained must be determined.In the structure stated above, for example /1SEM/_YS_CHAS_001MYAREA and /1SEM/_YS_KYFS_001MYAREA are contained.The total is the length you are looking for.
5. m: After executing the planning function, start Transaction STAD and find the appropriate statistical record for the dialog step, in which you have executed the planning function.The record contains a memory specification, which is the desired value for s.
Solution
Bear in mind that the values from the example are not generally valid, but were determined from a specific example.We recommend that you determine the parameters (both the values of the variables and of the relationships) for your specific case and to use it as the basis for discussion.You should not choose too few data records, because the fixed memory consumers predominate otherwise.
Regards-
Siddhu
Message was edited by: sidhartha -
Currency Translation for Key Figures with Value More Than One Currency
Hi...
I have query which display key figure GL Account Balance. The currency that used for this key figure is USD and IDR. How we want display value based on selection screen? So if we input currency USD, all value that use currency IDR translated to USD and all value that use currency USD not changed. Otherwise if we input IDR, all value that use currency USD translated to IDR and all value that use currency IDR not changed.
How we do this in query designer? Thank you.
I have use currency translation :
1. (Right Click Key Figures >> Properties >> Currency Conversion Key)
2. Target Currency Using Variables Entry
but seems the result is not correct. Can anyone help me ?
Regards,
SatriaHi all,
Thanks for your help, but still I have problem. I have create one currency conversion type, ZXXX. This currency conversion type is using exchange rate type = "M",source curr from Data Rec, sel of targ currency with translation,
and fixed time ref = "Current Date".
Problem:
1. With this setting, i create currency translation in BEx, but the result is not same, it's like the exchange rate not using the same setting with data in ECC (I compare data with transaction fs10N). Is my setting for exchange rate not correct?
2. When I try to display GL Account Balance --> Calculated Key Figure (Total Debet - Total Credit) for period 0, the translation not working. Example if the value is IDR 1234 then the value in USD still USD 1234. Why this happen?
Thank you
Regards,
Satria -
BW Architecture - SURVEY - key figures data model vs account data model
Hi SAP Gurus,
Between the keys figures data model, and the account data model which one do you implement/prefer and for which reason ?
Thanks,
Greg
Edited by: Greg C. on Jun 4, 2009 5:56 PMI once found the note 407563 on this subject. It gives the advantages and disadvantages from the point of view of data modelling and from the technical point of view.
It's a BPS note, but manly valid in a BW context.
Regards,
Fred -
Account Model and Key Figure Model
Hi,
please can anyone give me an explanation with example for Account Model and Key Figure Model
Thank you,
samHi Sam,
Please see here:
keyfigure based model and account based model
Hope this helps... -
How to transfer from key figure model into account model?
Hello,buddies:
If I have a datasource wich upload from FLAT FILE contains only key figures and I know every key figure's meaning,then I want to transfer it into account model.
For example,I have data like this
training fee salary compensation
20000 5000 5678
then I want to transfer this to:
training fee 20000
salary 5000
comp 5678
because the source contains no cost element,and the target contain elements.
How can I do this?Hi Martin,
You can use result table functinality in routines of update rules.
Assuming 0COSTELMNT and 0AMOUNT are the target fields
in your cube, value1, value2, value3 represent fields
form flat file/commstructure code for 0AMOUNT could be like this :
RESULT_TABLE-Amount = COMM_STRUCTURE-Value1.
RESULT_TABLE-COSTELMNT = 'training fee'.
append RESULT_TABLE.
RESULT_TABLE-Amount = COMM_STRUCTURE-Value2.
RESULT_TABLE-COSTELMNT = 'salary'.
append RESULT_TABLE.
RESULT_TABLE-Amount = COMM_STRUCTURE-Value3.
RESULT_TABLE-COSTELMNT = 'comp'.
append RESULT_TABLE.
So you generate 3 records for Infoprovider from one out of commstructure.
Regards
Joe -
Convert key figure model into account model
Hi experts,
I'm trying to extract data from table GLPCP, which is based on the account model, i.e. every month in the table is represented by a column:
PC - ACC - AMTJAN - AMTFEB - AMTMAR etc
123 1000 100 120 110
Whereas in BW the data should look like this (key figure model):
PC - ACC - PER - AMT
123 1000 01 100
123 1000 02 120
123 1000 03 110
What would be the most elegant way to do this?
I think I would have to do the conversion in the Start Routine of the Transfer Rules?
As I'm a hopeless case when it comes to ABAP, any code examples would be highly appreciated!
Thanks in advance.
GerritHi Martin,
You can use result table functinality in routines of update rules.
Assuming 0COSTELMNT and 0AMOUNT are the target fields
in your cube, value1, value2, value3 represent fields
form flat file/commstructure code for 0AMOUNT could be like this :
RESULT_TABLE-Amount = COMM_STRUCTURE-Value1.
RESULT_TABLE-COSTELMNT = 'training fee'.
append RESULT_TABLE.
RESULT_TABLE-Amount = COMM_STRUCTURE-Value2.
RESULT_TABLE-COSTELMNT = 'salary'.
append RESULT_TABLE.
RESULT_TABLE-Amount = COMM_STRUCTURE-Value3.
RESULT_TABLE-COSTELMNT = 'comp'.
append RESULT_TABLE.
So you generate 3 records for Infoprovider from one out of commstructure.
Regards
Joe -
What makes this a Key Figure Model (and not Account Model in BW) ?
I am reviewing a document on Key Figure Model versus Account Model in BW.
this example is said to be "Key Figure" Model
Customer Revenue Deductions COGS
A 100 DM 390 DM 50 DM
What makes this a Key Figure Model (and not Account Model in BW)Hi Amanda,
Consider the simplified a company income statement:
Sales
COGS
-- Gross profits
Selling and Administrative expense
Deperication expense
-- Operating profit
Interest expense
-- Earnings before taxes
Taxes
-- Earnings after taxes
Each of this lines is represented in BW as a key figure (lines with '--' represented as calculated KFs).
Different persons or companies may use their own details of income statement. For example, someone want to see instead of one line "Selling and Administrative expense" two - separatly selling and administrative expenses, or even break down of these expenses by category. In the KF model every new introducted line should be represented by a new KF.
In the Account Model every line is represented by one KF only. Let name it as 'Amount'. Another characteristic is telling us what kind of amount it is. Imagine that you have accounting trial balance that lists accounts, starting and ending balances, and debit and credit turnovers for each account.
An accountant will tell you that a credit turnover in account #XXXX represent the company revenue (sales), a debit turnover in account #YYYY - cost of goods sold etc.
Simplified inflow of transactional data will consist of:
Account Amount
XXXX -12345
YYYY 8765
etc.
In this model (assuming that you load data for all accounts) you can easily change the scheme of calculations and their presentations (groupping, regroupping etc.) in reports without creating new KFs.
In your example you provide a KF model because every distinct type of amounts is represented by its own KF.
Best regards,
Eugene
Message was edited by: Eugene Khusainov
Message was edited by: Eugene Khusainov -
Addition of key figure in master data attributes.
Hi All,
I have a scenario to DPO (Days payable outstanding) amount in FI.
I need to calculate purchases amount From 2LIS_O3_BF Based on the given input dates from customer .The Company code wise ACCOUNT PAYABLE amount to be calculated from OFI_AP_4.
There is no key link between this.
So i want to add one key figure in Company code attributes to calculate and store account payable amount using Routine. Then i will give this attribute as navigational in ODS of 2LIS_03_BF .
Can i have key figure in attributes of masterdata. I need to load this daily to calculate amount.
Is there any other solution, how performance will be effected with this solution.
Thanks,
JOHi Joseph;
Yes, you can add a KF as one attribute of master data.
The other solution that I see is you create a DSO as a target of 2LIS_03_BF and then a transformation with company code. Direct link between DS and IO is not advise because one is delta and the other is full (you could have some problems).
But if it's my choice... enhance the 0COMP_CODE_ATTR.
Regards;
Ricardo -
Key figure values in MC$K not updated
Hi
I have a situation where I run transaction MC$K (Material Analysis: On-time delivery: statistics):
At first I had not done any config in transaction MCFC for the deviation of delivery date. So when I ran MC$K, the delivery date variance key figures showed zero (0).
Then I updated the variance intervals in transaction MCFC and reran the report. Still did not show anything for the old purchase orders, but for any new created PO/GR that that I did after my settings in transaction MCFC are taken into account.
But what if I want to see anything that was created before I did my MCFC config? For the old purchase orders that is...is there any update program I need to run for the info structure?
I am a bit new to this so please bare with me...Hi,
Problem has been resolved by passing the 40 char length material, and location in the char combo table of BAPI.
Ex: CHARACTERISTIC_VALUE = 00000000000000000000000000000000000100600 (Should be 40 char).
CHAR_COMB_ID = 1 -
you can give any number.
Now i am facing another problem with this BAPI.......
In our planning book time periods like first two weeks in day buckets, after thet all in week buckets.
Case1: day buckts - noprob
case2: weekly buckets : suppose a week start from 17/01/2010 end with 23/01/2010. In this case i am not able to create a order on 22/01/2010.
BAPI allowing the time period start date as 17/01/2011 and end date as 23/01/2011 and its creating the oder on 20/01/2010(middle day of the week).
Can anybody suggest on this..
Thanks -
Key figure Period Value TC has a difference of 123,445- IDR in roundingstep
Hi,
Pls suggest some tips, to resolve this, as I am struck in Currency Translation;
Diagnosis
While checking the rounding conditions for key figure Period Value TC a difference of 123,445- IDR was found in step Balance Sheet.
System Response
The data will not be rounded.
Procedure
Examine the data to be rounded with regards to the key figure to be checked, Period Value TC. Check whether the rounding condition has been met for this key figure.
Make sure that the check looks at the total balance of posting levels 00, 01, and 10 (as opposed to the rounding algorithm, which rounds each posting level separately).
If the same message (with different differentials) appears elsewhere, please note that the check is performed for each subassignment value of those subassignments that have a selected default indicator in the differential account assignment. In this case, check the customizing settings for method step Balance Sheet.
Regards
CSM ReddyHi CSM Reddy,
The content of this forum is rather rich and contains a lot of questions and solutions given already.
So, I'm kindly remind you about searching functionality.
You could find, for example, this link:
SEM-BCS: Currency translation
A little remark. Disbalance may occur because of different reasons. So, first of all try to run the RFD validation. If the validation does end with errors, especially an error on the check that compares RE in B/S and NI in P&L, run the reclass (2nd one) mentioned in the link.
If such a check is green, then go for another reclass (the 1st in the link) which will round the balance. Usually, I run it in a test mode first, in order to see how much differences the system discovered. If they are not material, I round them. If they are, then it'd better to investigate the reason.
Hope this helps.
Edited by: Eugene Khusainov on Sep 23, 2008 12:12 PM -
Retraction problem, key figure mapping
Hello guys:
I am using the retraction function to retract activity data from BPS to R/3.
I have created the sender structure and now I am creating the mapping rules.
For the characteristics, there is no problem, but for the key figures, if I input a field name in the Sender FLd column, then I must enter a value in the "Sender fld val" column,could you tell me what is the use of this column?
I also click the "create proposal for value", it fill the key figure field name in the formula column, but when I run a check, the proposed rules is wrong.
Thank you very much.
Best regards,
EricHi Eric
You can maintain the parameters of retraction with transaction UBP_STRUCT
Chck this doc for details on tables to maintain
/people/praveen.mayalur/blog/2006/07/01/bps-retraction-for-cost-center-accounting--i
Ciao
Andr. -
Add new key figure with characteristics in report painter
Hi expert,
I am create a new report painter in GRR2 under report group 8A2 (EC-PCA: Standard Reports) and i would like to create a report show on G/L amount with segment.
When i click on first column to assign "key figure with characteristics" i am not able to find characteristics "segment".
Please kindly advice how to create in new characteristics in report painter?
Thanks.
p/s : profit center number is same with segment number
regards,
ng chong chuanHi,
"segment" is not a characteristic of classical profit-center accounting (libraries 8A*). Its a New GL characteristic, thus create a report painter report for New GL library.
best regards, Christian -
Hi All
Cud any one provide sample code how to upload accounts payable master data?
thnx in advance,
Pavani.Hi
Account Payables means the amounts that are to be paid to vendor against the purchase we made
So here the master data menas the VENDOR, MATERIAL data
see the related BDC programs
REPORT zmm_mat_master_non_stock
NO STANDARD PAGE HEADING
LINE-SIZE 255.
Standard Include for Selection Screen
INCLUDE bdcrecx1.
Internal Table for Upload Data
DATA: BEGIN OF i_mat OCCURS 0,
mbrsh(001), " Industry Sector
mtart(004), " Material Type
Views
Organization Levels
werks(004), " Plant
Basic Data1 View
maktx(040), " Material Description
meins(003), " Unit of Measure
matkl(009), " Material Group
MTPOS_MARA(004), " Gen Item Category
Purchasing
ekgrp(003), " Purchasing Group
END OF i_mat.
Data Variables & Constants
CONSTANTS : c_x VALUE 'X'. " Flag
Parameters
PARAMETERS: p_file LIKE ibipparms-path. " Filename
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
Start of Selection
START-OF-SELECTION.
Open the BDC Session
PERFORM open_group.
Upload the File into internal Table
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = i_mat
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Upload the Data from Internal Table
LOOP AT i_mat.
Basic Screen
PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-MATNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RMMG1-MBRSH'
'C'."i_mat-mbrsh.
PERFORM bdc_field USING 'RMMG1-MTART'
'NLAG'."i_mat-mtart.
Views Selection
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(08)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(01)'
c_x."i_mat-kzsel_01.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(02)'
c_x."i_mat-kzsel_02.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(08)'
c_x."i_mat-kzsel_08.
Organization Levels
PERFORM bdc_dynpro USING 'SAPLMGMM' '0080'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-WERKS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'RMMG1-WERKS'
'2000'."i_mat-werks.
Basic data1 View
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
i_mat-maktx.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARA-MTPOS_MARA'.
PERFORM bdc_field USING 'MARA-MEINS'
'EA'."i_mat-meins.
PERFORM bdc_field USING 'MARA-MATKL'
i_mat-matkl.
PERFORM bdc_field USING 'MARA-MTPOS_MARA'
'NLAG'."i_mat-mtpos_mara.
Basic data2 View
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.
Purchasing View
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_field USING 'MARC-EKGRP'
i_mat-ekgrp.
Call The Transaction
PERFORM bdc_transaction USING 'MM01'.
ENDLOOP.
Close the BDC Session
PERFORM close_group.
REPORT zmm_vendor_master_upload
NO STANDARD PAGE HEADING
LINE-SIZE 255.
ABAP Name : ZMM_VENDOR_MASTER_UPLOAD
Description : This Program is used to Upload the Vendor Master.
Standard Include for Selection Screen
INCLUDE bdcrecx1.
Internal Table for Upload Data
DATA: BEGIN OF i_vendor OCCURS 0,
bukrs(004), " Company Code
ekorg(004), " Purchase Orgn
ktokk(004), " Account Group
Address Screen
anred(015), " Title
name1(035), " Name1
sortl(010), " Sort Field
name2(035), " Name2
name3(035), " Contact Person1
name4(035), " Contact Person 2
stras(035), " Street
pfach(010), " PO Box
ort01(035), " City
pstlz(010), " Postal Code
land1(003), " Country
spras(002), " Language
telf1(016), " Telephone No
telfx(031), " Fax Number
lfurl(132), " URL-Mail Id
Material Group Characteristics
klart(003), " Class Type '010'
class(018), " Class 'Vendor'
mname_01(030), " Characteristic
mname_02(030), " Characteristic
mname_03(030), " Characteristic
mwert_01(030), " Charct.Value
mwert_02(030), " Charct.Value
mwert_03(030), " Charct.Value
Control Data
emnfr(010), " Manufact.Part No
Bank Details
banks_01(003), " Country of Bank1
banks_02(003), " Country of Bank2
bankl_01(015), " Bank Key of 1
bankl_02(015), " Bank Key of 2
bankn_01(018), " Account No Bank1
bankn_02(018), " Account No Bank2
Accounting Info
akont(010), " Reconcillation Account
zuawa(003), " Sort Key
fdgrv(010), " Cash Management Group
Payment Transactions
zterm(004), " Payment terms
reprf(001), " Check Double Inv.
zwels(010), " Payment Method
hbkid(005), " House Bank
xpore(001), " Individ.Payment
Correspondence
mahns(001), " Dunning Level
xausz(001), " Account Statement
Withholding Tax Details
qland(003), " Withholding Tax Country
witht_01(002), " WH tax Type
wt_withcd(002), " WH Tax Code
wt_subjct(001), " Indicator:WH Tax
Purchasing Data
waers(005), " Currency
zterm1(004), " Payment Terms
END OF i_vendor.
Data Variables & Constants
CONSTANTS : c_x VALUE 'X'. " Flag
Paramters
PARAMETERS: p_file LIKE ibipparms-path. " Filename
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
Start of Selection
START-OF-SELECTION.
Open the BDC Session
PERFORM open_group.
Upload the File into internal Table
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = i_vendor
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Upload the Data from Internal Table
LOOP AT i_vendor.
PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02K-BUKRS'
i_vendor-bukrs.
PERFORM bdc_field USING 'RF02K-EKORG'
i_vendor-ekorg.
PERFORM bdc_field USING 'RF02K-KTOKK'
i_vendor-ktokk.
PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-SPRAS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=KLAS'.
PERFORM bdc_field USING 'LFA1-ANRED'
i_vendor-anred.
PERFORM bdc_field USING 'LFA1-NAME1'
i_vendor-name1.
PERFORM bdc_field USING 'LFA1-SORTL'
i_vendor-sortl.
PERFORM bdc_field USING 'LFA1-NAME2'
i_vendor-name2.
PERFORM bdc_field USING 'LFA1-NAME3'
i_vendor-name3.
PERFORM bdc_field USING 'LFA1-NAME4'
i_vendor-name4.
PERFORM bdc_field USING 'LFA1-STRAS'
i_vendor-stras.
PERFORM bdc_field USING 'LFA1-PFACH'
i_vendor-pfach.
PERFORM bdc_field USING 'LFA1-ORT01'
i_vendor-ort01.
PERFORM bdc_field USING 'LFA1-PSTLZ'
i_vendor-pstlz.
PERFORM bdc_field USING 'LFA1-LAND1'
i_vendor-land1.
PERFORM bdc_field USING 'LFA1-SPRAS'
i_vendor-spras.
PERFORM bdc_field USING 'LFA1-TELF1'
i_vendor-telf1.
PERFORM bdc_field USING 'LFA1-TELFX'
i_vendor-telfx.
PERFORM bdc_field USING 'LFA1-LFURL'
i_vendor-lfurl.
PERFORM bdc_dynpro USING 'SAPLCLCA' '0602'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMCLF-KLART'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_field USING 'RMCLF-KLART'
'010'. "i_vendor-klart.
PERFORM bdc_dynpro USING 'SAPLCLFM' '0500'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMCLF-CLASS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=AUSW'.
PERFORM bdc_field USING 'RMCLF-CLASS(01)'
'Vendor'."i_vendor-class.
PERFORM bdc_dynpro USING 'SAPLCTMS' '0109'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RCTMS-MWERT(03)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
PERFORM bdc_field USING 'RCTMS-MNAME(01)'
'MATERIALGROUP'." i_vendor-mname_01.
PERFORM bdc_field USING 'RCTMS-MNAME(02)'
'MATERIALGROUP'." i_vendor-mname_02.
PERFORM bdc_field USING 'RCTMS-MNAME(03)'
'MATERIALGROUP'." i_vendor-mname_03.
PERFORM bdc_field USING 'RCTMS-MWERT(01)'
i_vendor-mwert_01.
PERFORM bdc_field USING 'RCTMS-MWERT(02)'
i_vendor-mwert_02.
PERFORM bdc_field USING 'RCTMS-MWERT(03)'
i_vendor-mwert_03.
PERFORM bdc_dynpro USING 'SAPLCLFM' '0500'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMCLF-CLASS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENDE'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-ANRED'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-EMNFR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_field USING 'LFA1-EMNFR'
i_vendor-emnfr.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKN(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_field USING 'LFBK-BANKS(01)'
i_vendor-banks_01.
PERFORM bdc_field USING 'LFBK-BANKS(02)'
i_vendor-banks_02.
PERFORM bdc_field USING 'LFBK-BANKL(01)'
i_vendor-bankl_01.
PERFORM bdc_field USING 'LFBK-BANKL(02)'
i_vendor-bankl_02.
PERFORM bdc_field USING 'LFBK-BANKN(01)'
i_vendor-bankn_01.
PERFORM bdc_field USING 'LFBK-BANKN(02)'
i_vendor-bankn_02.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-FDGRV'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_field USING 'LFB1-AKONT'
i_vendor-akont.
PERFORM bdc_field USING 'LFB1-ZUAWA'
i_vendor-zuawa.
PERFORM bdc_field USING 'LFB1-FDGRV'
i_vendor-fdgrv.
PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-XPORE'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_field USING 'LFB1-ZTERM'
i_vendor-zterm.
PERFORM bdc_field USING 'LFB1-REPRF'
c_x. "i_vendor-reprf.
PERFORM bdc_field USING 'LFB1-ZWELS'
i_vendor-zwels.
PERFORM bdc_field USING 'LFB1-HBKID'
i_vendor-hbkid.
PERFORM bdc_field USING 'LFB1-XPORE'
c_x. "i_vendor-xpore.
PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB5-MAHNS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_field USING 'LFB5-MAHNS'
i_vendor-mahns.
PERFORM bdc_field USING 'LFB1-XAUSZ'
i_vendor-xausz.
PERFORM bdc_dynpro USING 'SAPMF02K' '0610'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBW-WT_SUBJCT(01)'.
PERFORM bdc_field USING 'LFB1-QLAND'
i_vendor-qland.
PERFORM bdc_field USING 'LFBW-WITHT(01)'
i_vendor-witht_01.
PERFORM bdc_field USING 'LFBW-WT_WITHCD(01)'
i_vendor-wt_withcd.
PERFORM bdc_field USING 'LFBW-WT_SUBJCT(01)'
c_x.
PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFM1-ZTERM'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_field USING 'LFM1-WAERS'
i_vendor-waers.
PERFORM bdc_field USING 'LFM1-ZTERM'
i_vendor-zterm1.
PERFORM bdc_dynpro USING 'SAPMF02K' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-LIFNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
Call the Transaction
PERFORM bdc_transaction USING 'XK01'.
ENDLOOP.
Close the BDc Session
PERFORM close_group.
<b>Reward points for useful Answers</b>
Regards
Anji -
Dear All,
I am in need to develop customized report on Vendor Accounts payable - Aging for given slab.
I can find the open items for the given key date in the table BSIK.
if we want to calculate due on past date( for cleared item), how can we use BSIK. ?
Let consider the following scenario.
Consider an item is cleared on 10.02.2009. if the key date is 18.05.2009, there is no due for this item. But if the keydate is 15.12.2008, the item is on due. (consider 15.12.2008 is calculated with baseline date, credit days).
How can we calculate aging for this from BSIK. because BSIK contains only open items.
If we use BSAK ( Cleared Items ). How to calculate aging using baseline date, clearing date, credit days.
Regards,
S.SridharTo calculate aging,
You com use the FM J_1B_FI_NETDUE. If i undestand your problem, that FM will help you to calculate aging.
Regards
Maybe you are looking for
-
How to share iPhoto library among users on same iMac without using an external drive?
How can I share my iPhoto library with another user on the same iMac for use with iCloud. I do not want to use an external drive. Thanks
-
Trouble printing to a HP PSC750 All-in-One Printer
I have a HP PSC750 all in one printer and it seems to work only on occasion. Every so often though when I boot up and try to print something the print queue says the following: GenericClass: waiting for device If I unplug then plug the USB cable, wai
-
How does one configure Mavericks to extend a desktop across multiple displays?
-
I can't get my second e-mail to verify
Question - I can't get my second e-mail to verify.
-
How can I programatically collapse an export menu?
For example: When you are exporting an image there are many settings, like "File Settings" and whatnot. How can I trigger a command that will "collapse" or "minimize" that specific menu item? (This is the same function as clicking on the little black