Upload of Pricing
Hello SD Gurus,
If we are using LSMW for uploading the Condition records the field name KSCHL would be the same for PR00, PR02 and PMIN. How do I differentiate between them? So that the program picks up all the values at the same time?
Also if there are 2000 products, each product will have a PR00 and all these 2000 PR00s are to be entered for all the 1500 customers. How do I accomplish them?
Can somebody explain me? Also the T code whether VK11 or VK31.
Thanks in advance
Use LSMW for upload of pricing condition records. There should not be any problem and you can use VK11.
We have used this earlier and there have been no issues.
Regards,
GSL.
Similar Messages
-
Problem in data upload using pricing conditions with sales deal
hi...
i have to upload following fields -
Condition Type
Condition Table
Valid from
Valid to
Sales deal
Amount/Rate
Currency / %
Pricing Unit
Pricing UoM
Sales organization
Distribution channel
Sold to Party
Material Number
Material Pricing Grp
Batch number
Buying Group of Sold-to
Customer
Customer Group
CustomerHierarchy 01
CustomerHierarchy 02
CustomerHierarchy 03
CustomerHierarchy 04
CustomerHierarchy 05
Division
Sales Order Type
Sales Document Type
End user
Material Group
Tax Classification Material
Payer
Plant
Price Group
Price list type
Pricing reference material
Prod. Hier -1
Prod. Hier -2
Prod. Hier -3
Prod. Hier -4
Prod. Hier -5
Product hierarchy
Region of Dly Plant
Sales district
Sales group
Sales office
Sales unit
Ship-To
Shipping point
Buying Group of end user
Tax classification for customer
Type of Transaction
Scale Basis1
Scale Rate1
Scale Basis2
Scale Rate2
Scale Basis3
Scale Rate3
Scale Basis4
Scale Rate4
using XK15 t-code and SALES DEAL is the major concern.
1) First i used RV14 BTCI , that is a standard report for uploading the pricing conditions. But by using this all fields are updating except SALES DEAL becoz this is not present in the structures (like- BKOND-1, BKOND-2, BKOND-3 etc) that is used in RV14BTCI program. I searched other structures also but SALES DEAL is not present there.
2) Second i tried to find out some Function module that is containg SALES DEAL and i found two FMs - IDOC_INPUT_COND_A and BAPI_PRICES_CONDITIONS.....but
a) the FM - IDOC_INPUT_COND_A is used with ALE and where third party is involved, so we require control data and status data for this I dont have this. so we cant use it.
b) and the FM BAPI_PRICES_CONDITIONS is also not working for SALES DEAL....by using this it is also not uploaded becoz some mandatory information related to sales deal like- sales organisation, distribution channel are not present in this FM.
3) to upload this we can use the BDC recording method.....but the problem is - there are almost 15 condition types and based on these conditions almost 20 - 25 condition tables are there for every condition and based on the every table different screen sequence are there.....so if we go for BDC recording...than we have to make 325 recordings.....also not feasible solution.
so plz give the suggestions for this problem and check my efforts also may be i missed something that can be a solution.
Thanx in advance for all.......plz help.....Hi Jitendra,
Goto RSA3 trans in the source system. Check if are able to extract the data.
If so then replicate the DS once in BW system. Activate all the DS, transfer rules etc & try to load it again.
Hope this will solve your problem!
Regards,
Pavan -
Error in BDOC while uploading the pricing condition record to ECC from CRM
Hi all,
I have created a condition record for ECC pricing condition type (I have maintained all settings required for maintaining ECC condition type in CRM 7.0) in CRM 7.0. But theis condition record is not uploaded to ECC. I have checked BDOC, it is showing with error status for BDOC type "CND_M_SUP". The errors are as below.
1. sBDoc CNBCCPSAP005 does not contain structure CDBD_CONDREF
Message no. CND_MAST064
2. sBDoc CNBCCPSAP005 does not contain structure CDBD_CONDREF
Message no. CND_MAST064
3. Service that caused the error: CND_MAST_INT_DEEP_MB_TO_SBDOC
Message no. SMO8047Diagnosis
A service caused/ reported an error.
Can some one help me in fixing this issue please.
Thanks in advance,
JM
Edited by: JM on Sep 7, 2010 4:46 PMHi,
sBDOCs are not used in ECC to CRM or CRM to ECC data replication scenario. You can either ignore the error or disable mobile bridge.
Regards
Prasenjit -
Uploading the pricing master records using bapi
Hi I have to transfer the pricing database from legacy to SAP using bapi but I am not able to find a bapi for that. Pls guide.
Check BAPI: BAPI_PRICES_CONDITIONS. You can also find sample codes in SDN for the BAPI.
Check this link [Example for Price Conditions|Re: Sample code for BAPI_PRICES_CONDITIONS]
Regards
Eswar
Edited by: Eswar Rao Boddeti on Sep 22, 2008 3:52 PM -
Bulk Pricing condition record upload
can any body help out for , Is there any transaction code for uploading the pricing condition record in BUlk.
Ex: 1000 condition records upload for condition type PR00..
RagardsDear Ramesh,
This you can do by creating an LSMW,one of the mass upload tool.
Regards,
AKD
Edited by: Ashish Dikshit on Sep 19, 2009 9:31 AM -
Is it possíble upload spreadsheet for price condition?
Hi!!
My company would like to work with pricing list, but we have a lot of differents SKU and price by customer. For example, we have for one customer more than 500 different SKU's and price.
If we use the standard transaction VK11, we will have much work to update the price,
I would like to know if is it possible upload spreadsheet for price condition, by BAPI, ABAP program, etc~.
Our price condition have the follow key fields.
Sales organization
Customer
Material
Incoterms (CIF/FOB)
We will use Date to validate the price too.
Best regards,
Juoio CésarHi
You can use program RV14BTCI - Batch Input for Uploading Condition Pricing.
Check below links
Is there a way we can upload pricing condition ... | SCN
Standard Upload Program -
Upload & Maintain price conditions
Dear Gurus,
I need to create a program to upload and maintain different condition prices, some of the with scales.
LSMW is not an option.
Acording to OSS note 1135984 there are only two posibilities
1- Use the standar report RV14BTCI. The idea that I have for this is create a Z-program to read the file from local drive and then save into the server folder and submit RV14BTCI.
2 - IDoc message type COND_A. I have no idea how to implement the Idoc in a Z-program.
From my point of view, the IDoc solution is more powerful and flexible but I don't know how to use it in a Z-program and what I should customize for that.
I would like to ask you different things
1- Your experience and advices about to upload prices conditions
2- How to use the IDoc in a program.
Thank you very much,
ManuelHi,
Std BDC RV14BTCI is a good option.
You can create BDC/LSMW's at different condition levels and upload it using tcodes VK11/MEK1, etc.
Check out the following links which will give you some idea on BAPI's and also Idoc options.
Upload Price records for Condition Type using transaction VK11 and VK12
how to upload SD pricing conditions
https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/37ebcc90-0201-0010-0095-9fac419953a8&overridelayout=true
Re: uploading of vk11 (pricing condition) transaction
Regards,
Amit -
Update price conditions in massive way
Hi Gurus,
I defined a Rappel agreement with transaction VK11. Now i am needing to update this agreement for all customers so i would like to know if its possible to update at massive way instead of one per one.
The field "Customer" is a mandatory field and its only lets you put one customer instead of a range of customers.
Thanks in advance!
Best Regards
Juan Bretón.Dear Juan,
I suppose, the easiest way is to use LSMW.
If requires, I'll provide one of my post - LSMW Record, for reference.
If, you would like to go for BDC-Program, following Thread would be helpful:
[BDC - Condition Record|Requirement type and Requirement class]
Best Regards,
Amit
Note: Meanwhile, you refer:
[Pricing Condition Upload|LSMW Pricing Condition changes] -
Hi
Can any one tell me how to create <b>Generic BDC for transaction VK11 (Creating condition records)</b>
My actual requirement is like we need to create <b>condition record</b> for every material with all the condition types exist for that material for different key combinations . <b>A condition record for every material is to be created for different condition types and different key combinations where material MATNR is a key field .For example we need to create condition records dynamically for condition types ZPR0, ZCM0 etc.. for different key combinations where matnr is a key field .</b>
can anyone of you point out a way to me?
Thanks in advance
Shivakumarplease copy the program and use it
* Report to Upload the pricing condtion records for materials. *
* Program : ZSDR_PRICE_UPLOAD *
* Author : girish.
* Description: *
* This report Creat pricing condition records for materials *
* Tables Used : SELECT UPDATE INSERT DELETE *
* MVKE X *
* Input/Output Files: *
* Transactions called: *
* Includes: *
* Run Frequency - *
* Program History *
* Date Change No Change Request SAP Rel NSC Rel *
* Description *
* 4.6C *
REPORT zsdr_price_upload MESSAGE-ID zsdr_bdc_vk11 LINE-SIZE 150
LINE-COUNT 75 .
******Internal Table for Header Data.
TYPES : BEGIN OF type_header,
kschl LIKE konv-kschl,
vkorg LIKE vbak-vkorg,
vtweg LIKE komg-spart,
matnr LIKE mvke-matnr,
kbetr(11) TYPE c,
datab(10) TYPE c,
datbi(10) TYPE c,
END OF type_header.
****Internal Table for Item Level.
TYPES : BEGIN OF type_item,
kschl LIKE konv-kschl,
vkorg LIKE vbak-vkorg,
vtweg LIKE komg-spart,
matnr LIKE mvke-matnr,
kbetr(11) TYPE c,
datab(10) TYPE c,
datbi(10) TYPE c,
END OF type_item.
******Error Table For not found in MVKE.
TYPES : BEGIN OF type_error ,
kschl LIKE konv-kschl,
vkorg LIKE vbak-vkorg,
vtweg LIKE komg-spart,
matnr LIKE mvke-matnr,
kbetr LIKE konp-kbetr,
datab(10) TYPE c,
datbi(10) TYPE c,
text(100) TYPE c,
END OF type_error.
****For error Messages
TYPES : BEGIN OF type_mtab,
matnr LIKE mara-matnr,
msgtyp LIKE bdcmsgcoll-msgtyp,
msgid LIKE bdcmsgcoll-msgid,
msgnr LIKE bdcmsgcoll-msgnr,
text(100) TYPE c,
END OF type_mtab.
****Internal Table
TYPES: BEGIN OF type_mvke,
matnr LIKE mvke-matnr,
vkorg LIKE mvke-vkorg,
vtweg LIKE mvke-vtweg,
END OF type_mvke.
****Internal Table
TYPES : BEGIN OF type_tvkov,
vkorg LIKE tvkov-vkorg,
vtweg LIKE tvkov-vtweg,
END OF type_tvkov.
** Declaring Internal Tables
DATA : t_header TYPE STANDARD TABLE OF type_header,
t_item TYPE STANDARD TABLE OF type_item,
t_mvke TYPE STANDARD TABLE OF type_mvke,
t_tvkov TYPE STANDARD TABLE OF type_tvkov,
t_error TYPE STANDARD TABLE OF type_error,
t_mtab TYPE STANDARD TABLE OF type_mtab.
** Work Area Declaration.
DATA : wa_header LIKE LINE OF t_header,
wa_item LIKE LINE OF t_item,
wa_error LIKE LINE OF t_error,
wa_mtab LIKE LINE OF t_mtab,
wa_tvkov LIKE LINE OF t_tvkov,
wa_mvke LIKE LINE OF t_mvke.
**Rows for Table with Excel Data********
DATA: t_xls_file LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
***Constant.
DATA : c_params LIKE ctu_params.
DATA : c_ans(1) TYPE c.
DATA : v_count(4) TYPE c. " To show No.of records
DATA : bdctab LIKE bdcdata OCCURS 10 WITH HEADER LINE. " BDCDATA
DATA : tmess_mtab LIKE bdcmsgcoll OCCURS 10 WITH HEADER LINE.
** SELECTION SCREEN
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_fname LIKE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK b1.
* END OF SELECTION SCREEN.
DATA : repid LIKE sy-repid.
DATA : v_matnr(50) TYPE c, "used for line items
v_kbetr(50) TYPE c, "used for line items
v_dat1(50) TYPE c, "used for line items
v_dat(50) TYPE c. "used for line items
DATA : v_lindx(5) TYPE n ,"index counter for first 14 records.
v_lindx1(5) TYPE n VALUE '01', "index counter for 13 records.
v_item(5) TYPE c, "To increment the line index
v_pgedwn2 TYPE i . "For Pagedown Counter
DATA: v_currentrow TYPE i. "For Current Row
DATA v_bdc(50) TYPE c." Text to apper in Confrim POPUP Window.
************AT SELECTION-SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
PERFORM get_filename USING p_fname.
*************START-OF-SELECTION
START-OF-SELECTION.
******Values for Ctu_params to Transaction
c_params-defsize = 'X'.
c_params-dismode = 'N'.
c_params-updmode = 'S'.
******Refresh
PERFORM f_refresh.
*********To upload File.
PERFORM upload_file.
****User Confrimation only BDC will Process
IF c_ans = '1'.
** *** BDC Process.
PERFORM read_data.
ELSE.
FORMAT COLOR 3 INTENSIFIED .
WRITE:/ 'Selected not to Process the Upload'.
EXIT.
ENDIF.
******On completion of Process Refresh the Internal Table
REFRESH : t_xls_file,
t_header,
t_item,
t_mvke,
t_tvkov.
CLEAR : t_xls_file,
wa_header,
wa_item,
wa_mvke,
wa_tvkov.
***********Display Messages
WRITE : /01 'Status',19 'Status Text'.
WRITE AT 0(150) sy-uline.
LOOP AT t_mtab INTO wa_mtab.
WRITE :/01 wa_mtab-msgtyp,19 wa_mtab-text.
ENDLOOP.
SKIP 2.
SORT t_error BY matnr.
WRITE AT 0(150) sy-uline.
WRITE 'ERROR MESSAGES'.
WRITE AT 0(150) sy-uline.
WRITE :/01 'Material.No',20 'Status Text'.
WRITE AT 0(150) sy-uline.
LOOP AT t_error INTO wa_error WHERE matnr NE ' '.
WRITE:/01 wa_error-matnr,20 wa_error-text.
ENDLOOP.
*& Form get_filename
* text
* -->P_FILENAME text
FORM get_filename USING p_fname.
*****To read the file from Presentation Server
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = repid
dynpro_number ! ; = syst-dynnr
field_name = p_fname
* STATIC = ' '
mask = '*.XLS'
CHANGING
file_name = p_fname
EXCEPTIONS
mask_too_long = 1
OTHERS = 2
IF sy-subrc <> 0.
* * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " get_filename
*& Form upload_file
* text
* --> p1 text
* <-- p2 text
FORM upload_file.
DATA : frow VALUE 2 TYPE i,
fcol VALUE 1 TYPE i,
erow VALUE 10000 TYPE i,
ecol VALUE 7 TYPE i,
ecol1 VALUE 1 TYPE i,
c_col1 TYPE i VALUE '0001',
c_col2 TYPE i VALUE '0002',
c_col3 TYPE i VALUE '0003',
&nb! sp; c_col4 TYPE i VALUE '0004',
c_col5 TYPE i VALUE '0005',
c_col6 TYPE i VALUE '0006',
c_col7 TYPE i VALUE '0007'.
***FM used to UPLOAD data from Flat file
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_fname
i_begin_col = fcol
i_begin_row = frow
i_end_col = ecol
i_end_row = erow
TABLES
intern = t_xls_file
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE e000.
ENDIF.
****T_XLS_FILE is initial, stop the process & throw message
IF t_xls_file[] IS INITIAL.
FORMAT COLOR 6 ON INTENSIFIED ON.
WRITE:/ 'No Data Exists '.
FORMAT COLOR OFF INTENSIFIED OFF.
STOP.
ELSE.
* Sort table by rows and colums
SORT t_xls_file BY row col.
* Get first row retrieved
READ TABLE t_xls_file INDEX 1.
* Set first row retrieved to current row
v_currentrow = t_xls_file-row.
**Loop to move data in internal Table
LOOP AT t_xls_file .
* Reset values for next row
IF t_xls_file-row NE v_currentrow.
APPEND wa_header TO t_header.
CLEAR wa_header.
v_currentrow = t_xls_file-row.
ENDIF.
CASE t_xls_file-col.
WHEN c_col1. "Kschl
wa_header-kschl = t_xls_file-value.
WHEN c_col2. "Vkorg
wa_header-vkorg = t_xls_file-value.
WHEN c_col3. "vtweg
wa_header-vtweg = t_xls_file-value.
WHEN c_col4. "Matnr
wa_header-matnr = t_xls_file-value.
WHEN c_col5. "Kbetr
wa_header-kbetr = t_xls_file-value.
WHEN c_col6. "FROm
wa_header-datab = t_xls_file-value.
WHEN c_col7. "TO
wa_header-datbi = t_xls_file-value.
ENDCASE.
ENDLOOP.
APPEND wa_header TO t_header.
CLEAR wa_header.
ENDIF.
****To process the data
PERFORM f_process.
ENDFORM. " upload_file
*& Form READ_DATA
* text
* --> p1 text
* <-- p2 text
FORM read_data.
****To make Uniq Records in Header Level
SORT t_header BY kschl vkorg vtweg.
DELETE ADJACENT DUPLICATES FROM t_header COMPARING
kschl vkorg vtweg .
SORT t_item BY vkorg vtweg matnr.
DATA : wa1_item TYPE type_item.
DATA : l_cnt TYPE i.
DATA : flag(1) TYPE c. "to process the Line item.
***Looping Header Table.
LOOP AT t_header INTO wa_header.
PERFORM bdc_dynpro US! ING 'SAPMV13A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV13A-KSCHL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ANTA'.
PERFORM bdc_field USING 'RV13A-KSCHL'
wa_header-kschl.
PERFORM bdc_dynpro USING 'SAPLV14A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV130-SELKZ(03)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_field USING 'RV130-SELKZ(03)'
'X'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1004'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMG-VKORG'.
PERFORM bdc_field USING 'KOMG-VKORG'
wa_header-vkorg.
PERFORM bdc_field USING 'KOMG-VTWEG'
wa_header-vtweg.
****To handle Line Items.
LOOP AT t_item INTO wa1_item WHERE vkorg = wa_header-vkorg AND
vtweg = wa_header-vtweg.
wa_item = wa1_item.
******Flag Set only After processing first 14 records .
IF flag = ' '.
v_lindx = v_lindx + 01.
SHIFT v_lindx LEFT DELETING LEADING '0'.
v_item = v_lindx .
CONCATENATE 'KOMG-MATNR(' v_item ')' INTO v_matnr.
PERFORM bdc_field USING v_matnr
wa_item-matnr.
CONCATENATE 'KONP-KBETR(' v_item ')' INTO v_kbetr.
PERFORM bdc_field USING v_kbetr
wa_item-kbetr.
CONCATENATE 'RV13A-DATAB(' v_item ')' INTO v_dat.
PERFORM bdc_field USING v_dat
wa_item-datab.
CONCATENATE 'RV13A-DATBI(' v_item ')' INTO v_dat1.
PERFORM bdc_field USING v_dat1
wa_item-datbi.
IF v_item = 14.
flag = 'X'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1004'.
CLEAR v_lindx.
CLEAR v_item.
CONTINUE.
ENDIF.
ENDIF.
***Flag is Set after Processing of 14 records.
****** TO process rest of Records
IF flag = 'X'.
v_pgedwn2 = v_pgedwn2 + 1.
v_lindx1 = v_lindx1 + 01.
SHIFT v_lindx1 LEFT DE! LETING LEADING '0'.
v_item = v_lindx1 .
CONCATENATE 'KOMG-MATNR(' v_it! em ')' INTO v_matnr.
PERFORM bdc_field USING v_matnr
wa_item-matnr.
CONCATENATE 'KONP-KBETR(' v_item ')' INTO v_kbetr.
PERFORM bdc_field USING v_kbetr
wa_item-kbetr.
CONCATENATE 'RV13A-DATAB(' v_item ')' INTO v_dat.
PERFORM bdc_field USING v_dat
wa_item-datab.
CONCATENATE 'RV13A-DATBI(' v_item ')' INTO v_dat1.
PERFORM bdc_field USING v_dat1
wa_item-datbi.
IF v_pgedwn2 = 13.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1004'.
v_pgedwn2 = 0.
v_lindx1 = 1.
CLEAR v_item.
CONTINUE.
ENDIF.
ENDIF.
ENDLOOP.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
****** Calling Transaction after Processing All items.
CALL TRANSACTION 'VK11' USING bdctab
OPTIONS FROM c_params MESSAGES INTO tmess_mtab.
REFRESH bdctab.
CLEAR : bdctab.
CLEAR : wa_item.
CLEAR : wa1_item.
CLEAR : wa_header.
CLEAR : l_cnt.
CLEAR : v_lindx1.
CLEAR: v_pgedwn2,v_lindx.
LOOP AT tmess_mtab .
l_cnt = l_cnt + 1.
READ TABLE t_item INTO wa_item INDEX l_cnt .
CALL FUNCTION 'MASS_MESSAGE_GET' "To get the Message Text
EXPORTING
arbgb = tmess_mtab-msgid
msgnr = tmess_mtab-msgnr
msgv1 = tmess_mtab-msgv1
msgv2 = tmess_mtab-msgv2
msgv3 = tmess_mtab-msgv3
msgv4 ! = tmess_mtab-msgv4
IMPORTING
msgtext = wa_mtab-text
EXCEPTIONS
message_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
wa_mtab-matnr = wa_item-matnr.
wa_mtab-msgtyp = tmess_mtab-msgtyp.
wa_mtab-msgid = tmess_mtab-msgid.
wa_mtab-msgn! r = tmess_mtab-msgnr.
APPEND wa_mtab TO t_mtab.
CLEAR wa_mtab-text.
CLEAR wa_item.
ENDLOOP.
ENDLOOP.
ENDFORM. " READ_DATA
*& Form BDC_DYNPRO
* text
* -->P_0300 text
* -->P_0301 text
* Start new screen *
FORM bdc_dynpro USING program dynpro.
CLEAR bdctab.
bdctab-program = program.
bdctab-dynpro = dynpro.
bdctab-dynbegin = 'X'.
APPEND bdctab.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
* text
* -->P_0305 text
* -->P_WA_HEADER_KSCHL text
* Insert field *
FORM bdc_field USING fnam fval.
CLEAR bdctab.
bdctab-fnam = fnam.
bdctab-fval = fval.
APPEND bdctab.
ENDFORM. " BDC_FIELD
*& Form bdc_trc_ansaction
* text
* -->P_0527 text
*& Form f_Process
* text
* --> p1 text
* <-- p2 text
FORM f_process.
DATA : l_todate(12) TYPE c,
l_frdate(12) TYPE c.
***Select for all entries of material in Header "Flat File Materials".
IF NOT t_header[] IS INITIAL.
SELECT matnr vkorg vtweg FROM mvke INTO TABLE t_mvke FOR ALL ENTRIES
IN t_header WHERE matnr = t_header-matnr AND
vkorg = t_header-vkorg AND
vtweg = t_header-vtweg.
ENDIF.
*********select Sales.org & Dist.channel.
IF NOT t_header[] IS INITIAL.
SELECT vkorg vtweg FROM tvkov INTO TABLE t_tvkov FOR ALL ENTRIES IN
t_header WHERE vkorg = t_header-vkorg
AND vtweg = t_header-vtweg.
ENDIF.
***Checking for material in Sales Master Table
SORT t_mvke BY matnr vkorg vtweg.
SORT t_tvkov BY vkorg vtweg.
LOOP AT t_header INTO wa_header.
READ TABLE t_mvke INTO wa_mvke WITH KEY matnr = wa_header-matnr
vkorg = wa_header-vkorg
! ; vtweg = wa_header-vtweg BINARY SEARCH.
IF sy-subrc <> 0.
wa_error = wa_header.
&nb! sp; MOVE text-011 TO wa_error-text.
APPEND wa_error TO t_error.
DELETE TABLE t_header FROM wa_header.
ELSE.
********Date Validations
IF ( wa_header-datab NE ' ! ; ' AND wa_header-datbi NE ' ' ) .
l_todate = wa_header-datab.
l_frdate = wa_header-datbi.
REPLACE '.' INTO l_toda! te WITH ''.
REPLACE '.' INTO l_todate WITH ''.
CONDENSE l_todate NO-GAPS.
REPLACE '.' INTO l_frdate WITH ''.
REPLACE '.' INTO l_frdate WITH ''.
CONDENSE l_frdate NO-GAPS.
IF l_frdate < l_todate.
wa_error = wa_header .
MOVE text-012 TO wa_error-text.
APPEND wa_error TO t_error.
DELETE TABLE t_header FROM wa_header.
ENDIF.
ELSE.
wa_error = wa_header .
MOVE text-016 TO wa_error-text.
APPEND wa_error TO t_error.
DELETE TABLE t_header FROM wa_header.
ENDIF.
ENDIF.
********Rate Validation.
IF wa_header-kbetr = ' '.
wa_error = wa_header .
MOVE text-017 TO wa_error-text.
APPEND wa_error TO t_error.
DELETE TABLE t_header FROM wa_header.
ENDIF.
READ TABLE t_tvkov INTO wa_tvkov WITH KEY vkorg = wa_header-vkorg
BINARY SEARCH.
IF sy-subrc = 0.
READ TABLE t_tvkov INTO wa_tvkov WITH KEY vtweg = wa_header-vtweg
BINARY SEARCH.
IF sy-subrc <> 0.
wa_error = wa_header.
MOVE text-015 TO wa_error-text.
WRITE wa_header-vtweg TO wa_error-text+13(4).
APPEND wa_error TO t_error.
ENDIF.
ELSE.
wa_error = wa_header.
MOVE text-013 TO wa_error-text.
WRITE wa_header-vkorg TO wa_error-text+9(4).
APPEND wa_error TO t_error.
ENDIF.
CLEAR wa_header.
ENDLOOP.
*****Deleting Duplicate Material Form Header "Flat File Data".
SORT t_header BY kschl vkorg vtweg matnr.
DELETE ADJACENT DUPLICATES FROM t_header COMPARING
kschl! vkorg vtweg matnr .
* ****Data Moving from Header to Item Level.
t_item[] = t_header[].
*To count No.of records in Item Table.
DESCRIBE TABLE t_item LINES v_count.
CONCATENATE text-014 ' ' v_count INTO v_bdc.
****Popup to get Confirmation from user to process BDC
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'Confirmation of File Data'
text_question = v_bdc
text_button_1 = 'Confirm'
text_button_2 = 'Cancel Run'
default_button = '1'
IMPORTING
answer = c_ans.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-! MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " f_Process
*& Form f_Refresh
* text
* --> p1 text
* <-- p2 text
FORM f_refresh.
REFRESH : t_xls_file,
t_header,
t_item,
t_mvke,
t_tvkov,
t_error,
t_mtab.
CLEAR : t_xls_file,
wa_header,
wa_item,
wa_mvke,
wa_tvkov,
wa_error,
wa_mtab.
ENDFORM. " f_Refresh
reward point s if it is usefull ....
girish -
Hello,
while doing the transcational data mapping for open sales order and so on, where and how do we migrate the price of the material and the pricing values.
regardsin our case there are about 4000 sales orders, so manual does not make sense, question is, when we are doing the transcational data mapping, the pricing of the open sales orders has to migrated, now from what i understand , i have to make the same kind of spread sheet for upload which involves, ( table #, conditon type, s.org, div..........) which i would be making for master data upload for pricing, so if it is the same, why i have to do for transcational data also.
correct me if i am wrong, as i am trying to understand this, master data is uploaded first, and then the transcational data, so if masterdata is already there, why need transcational data for condition records.
i would appreciate the answers as i am in immidiate need of it. -
hi experts,
Batch Input for Creation and Change of condition records for condition types with different access sequences in sales and distribution. what did it mean explaine me briefly
thanks in advance.Hi,
It means you have to upload the Pricing related data(Condition Records) using the Transactions VK11 and VK12.
Regards,
Anji -
OB08 currency exchange rates actually used in system
Hello All,
We are currently in the process of evaluating vendors for a daily FX rate upload. During the vendor evaluation process, we realized that upwards of 650 cross rates are entered into the system on a monthly basis and the team uploading the rates are not sure all are being used. Since the daily FX upload is priced per exchange rate that is passed we'd like to make sure all of the current exchange rates maintained in OB08 are actually being used in the system. Does anyone have ideas on how to obtain what currency exchange rates are actually used. We're hoping to reduce our number of cross rates passed in the daily feed by elimating the exchange rates that are not used but I'm not sure how to find that out. Thanks in advance for the help.
Cheers,
JordanYou could download all entries in table BKPF and derive unique values in currency key (WAERS). Those are the foreign currencies that you are using in your system. You need exchange rates between those currencies and your local currency/group currency and also between your local currency and group currency.
-
Massive modification of prices
I need change the prices of some materials. (300 more or less).
I have in a excel sheet this information (material-price). How can I paste the 300 lines of materials with its new prices at the same time? I only can paste a number of lines equals to the number of lines that I can see in the screen.
I am using the vk13 transaction.
ThanksDear Oscar
You can make use of BDC to upload the pricing conditions in bulk and assign a TCode for the same.
With the assigned tcode, the end users make mass update
thanks
G.Lakshmipathi -
Pricing condition upload in Inforecords
Hi All,
I need your help for the following issue.
Business requirement is they need a new program which will upload condition in the info record and also they want to change the pricing change values for existing pricing condition .
I am giving Plant , vendor , condition type and validity date from selection .From the input file I am giving material and price , currency .
I am facing problem while changing exist condition type values in Info record in BDC session.While going before BDC session we are checking A017 or A018 table .
From this we are taking condition record no (latest validity condition ).We are using this condition record in KONP table from this we are finding sequence number for the condition type
Now the problem is this sequence not matching with the sequence of PIR conditions screen sequence .In PIR these conditions shuffled on the basis pricing procedure .
Sequence in Condition table
SequNo of cond. Application Condition type
01 M PB00
02 M FRA2
03 M RA00
04 M FRB1
05 M ZA00
06 M ZCOP
07 M ZC00
But in the front end screen of PIR sequence is
PB00 Gross Price 1,175.00
RA00 Discount % on Net 4.000-
ZA00 Surcharge % on Net 2.000
ZCOP Scrapping % on Gross
ZC00 Surcharge/Quantity
FRA2 Freight % provision 1.000
FRB1 Freight (Value) 0.02
These condtion shuffled occured based on pricing procedure .
Could you please help me to get the current sequence while going to BDC session.
Please share you thoughts on this.
Let me know if you required any information to understand the scenario.
Awaiting for your reply.
Thanks & Regards,
Srikanth P.Hi. I know this is late but I'm having issues with the same type of upload and I came accross your post.
I use function module 'PRICING_SCHEME' to get the correct order:
* populate KOMK.
ls_komk-kappl = 'M'.
ls_komk-kalsm = 'RM0002'.
* populate KOMP
ls_komp-kposn = '000001'.
loop at it_input ASSIGNING <ls_input>.
* populate internal table TKOMV.
CLEAR ls_komv.
ls_komv-kappl = 'M'.
ls_komv-kposn = '000001'.
ls_komv-kschl = <ls_input>-kschl.
APPEND ls_komv to rt_komv.
endloop.
CALL FUNCTION 'PRICING_SCHEME'
EXPORTING
calculation_type = 'A'
comm_head_i = ls_komk
comm_item_i = ls_komp
TABLES
tkomv = rt_komv.
endmethod. -
Uploading of vk11 (pricing condition) transaction
Hi friends,
I have to upload data from legacy system to SAP using VK11 tcode , can use LSMW for VK11 transaction ? . I have to use batch input standard program....
when we open VK11 tranaction first its asking for condition type ( KSCHL ) for each condition type the next screen is varying .
is it possible to do using recording.?
otherwise
is there any stanadard LSMW program for this ,in the batch input.
what is that program how to use that program.
can any body help me in this regard.
Regards,
JayanHi,
For pricing conditions you will be having the condition type and table name in the
first screen of the VK11 transaction.
In the second screen of VK11 you can see the fields will be varing based up on the
table name you are specifying the first screen.
You can use field VAKEY in the batch input program to pass all the values.
For example:
Your table name A601 contians three fields mentioned below.Leave the fields such as
KAPPL,KSCHL,DATBI,DATAB,KBSTAT,KNUMH since these will be avialble for all the tables.
the rest varing fields are
VKORG VKORG CHAR 4
VTWEG VTWEG CHAR 2
SPART SPART CHAR 2
KUNNR KUNNR_V CHAR 10
KONDA KONDA_V CHAR 2
MATNR MATNR CHAR 18
KFRST KFRST CHAR 1
You need to pass the value of all the fields to the VAKEY in the batch input program.
using offset option mentioned below.
VAKEY+0(4) = source-vkorg.
VAKEY+4(2) = source-vkorg.
VAKEY+6(2) = source-vkorg.
VAKEY+8(10) = source-vkorg.
VAKEY+18(18) = source-vkorg.
VAKEY+ 36(1) = source-vkorg.
Hope this will help you
Maybe you are looking for
-
Best practice question for implementing a custom component
I'm implementing a custom component which renders multiple <input type="text" .../> controls as part of it. The examples I've seen that do something similar use the ResponseWriter to generate the markup "by hand" like: writer.startElement("input
-
How to align the components in panelGrid right?
I have a panelGrid with two column, the left column is a image and the right colum is commandLink. <h:panelGrid border="0" columns="2" width="100%" columnClasses="headerColumn1, headerColumn2"> .headerColumn1 { vertical-align: top; width: 50; .header
-
Disparity between selection list and iPod list
I have my iTunes preferences set to update selected playlist ("User's iPod Selection")only. However, my iPod shows that I have only 1,094 songs on it, whereas my "User's iPod Selection" shows 3,766 songs on it. Could someone kindly explain what I hav
-
i am at work and someone is trying to share my itunes library. Is there a way to put a password or lock on it somehow?
-
How to implement Side Navigation programmatically
Hi, My requirement is I want to implement side navigation for one of my task.(Like Functional Administrator =>Personalization =>Import/Export). I have gone through the tutorial given in Jdeveloper Help for side navigation in which it refers how progr