VK11 Condictions
My client wants to register a price in VK11 for condition PR00 (example) and he wants that this condition be free on the pricing when the user is creating a Sales Order. But he wants to control what were changed in PR00 bt the user it they do that, and the client wants to see the value in pricing that came from VK11 versus the value that the user manually changed and a calculation that shows the difference between the PR00 changed to what originally came from the VK11 .
For this I created a control in pricing: On the line 980 (latest) I put a subtotal without specific condition and the "level minimum" and "level maximum" I put 10 10 (in the pricing is where the PR00 is) then well, I can replicate what is in PR00 in Sales Order on this subtotal. Also created a condition ZPR0 with negative function and put in the pricing level 985 (just below the subtotal that replicates the PR00) and I set up in the VK11 the ZPR0 exactly the same as PR00. I also created a new subtotal line 990 of pricing, and there put in the "level minimum" and "level maximum" I put 985 980, as the 980 level has a negative condition it will give me exactly the difference between the PR00 edited and what came from the VK11 for the PR00 (because I have the ZPR0 set up also in VK11).
Problem: The client doesn't want to have two conditions set in the VK11 (PR00 and ZPR0) because the price list is large and the user can update one and forgent another.
Question: How can I do to the condition created ZPR0 bring a copy of which is bringing the VK11 for PR00? or how can I do to make ZPR0 a copy of PR00 in the Sales Order, but it doesn't change when the user manually change the PR00? There is a way to create a task that causes whenever the user changes in configuration or create a VK11 for condition PR00 is also created for the same configuration ZPR0 without the user knows?
Thanks!
FGRezende
I'm planning to create a formula and create a new condition, and assign this formula to it.
The formula would look in the table KONP (VK11) the KBETR value (value entered by the user) for condition PR00 and would then subtract this value from the table KOMV (Pricing Sales Order) field KBERT (line condition) for condition PR00 . So this formula will check what is in VK11 vs. what they changed in the PR00 pricing.
What do you think?
@Henrique, did you mean it right?
@Sven, I haven't found the field RefConType in the type of condition.
Thanks!
FGRezende.
Similar Messages
-
Reg: LSMW Multiple line items of scale pricing in transaction VK11
Hi,
Iam using LSMW to upload price condition records(VK11)
Totally Iam having two records which i have split as 2 flat files.
one flat file with header details and another flat file with line items for scale quantity and scale pricing, something like below.
Header flat file
__ZPR3__
__cust1__
__Mat1__
__AUD__
__EA__
__100__
__10__
__ZPR3__
__cust2__
__Mat2__
__AUD__
__EA__
__300__
__10__
Line Item Flat file
__cust1__
__mat1__
__95__
__20__
__cust1__
__mat1__
__90__
__30__
__cust1__
__mat1__
__85__
__40__
__cust1__
__mat1__
__80__
__50__
__cust1__
__mat1__
__75__
__60__
__cust2__
__mat2__
__70__
__20__
__cust2__
__mat2__
__65__
__30__
__cust2__
__mat2__
__60__
__40__
When i do the step of Read Data in LSMW iam getting the data correctly.
in Display read data step i got the header data in yellow and its line item in blue.
In Convert data step iam gettin as
Transaction read = 2.
Records read = 11.
Transaction written = 2.
Record written = 9.
In Display Converted data step Iam getting every record as a higher level item (displayed in green)
In Create Batch Input Session step Iam getting the message as 1 batch Input folder with 9 transactions
Which is actually wrong because only two transaction only must be written.
I think i migh have problem in Convert data step but iam not sure, can anyone help me what should be done.
My requirement is to upload the two datas with multiple scale prices for transaction vk11.
Kindly Help.
Regards
Naveenhi,
For u r reqrmnt u can make use of direct input method.
1)
Object 0070 Condition record
Method 0000
Program name RV14BTCI
Program type B Batch input
it make use of transaction VK15( alternate for vk11where instead of selecting combination u can directly input table name)
2) create u r internal table structure with the following fields
KSCHL cond type
KOTABNR cond table
VKORG sales org
VTWEG distr chnnl
KUNNR customer
MATNR material num
WERKS plant
WAERK currency
DATAB from date
DATBI to date
KSTBM cond scale qty
KBETR rate
LOEVM_KO del ind
KPEIN cond pricing unit
in the above if u dont require any fields u can omit but make sure u r using all key fields.
i thnk in u r reqrmnt its customer specific pricing so customer, cond scale qty,rate r needed.
deltion indicator is used to delete existing records.
3) maintain structure relations till BKOND3
4) for field mapping do Auto field mapping
give Tcode VK15
give value for VAKEY ( concate salesorg, plant,materialno,customer)
assign dates in standard format (YYYYMMDD)
5) Run remaining steps like assigning files, read convert and all
u r flat file structure shud be da same like u r internal table.
if u r not givin values provide empty space.
flat file
zpr3 cust1 mat1 aud ea 100 10 95 20
zpr3 cust1 mat1 aud ea 100 10 90 30
zpr3 cust2 mat2 aud ea 300 10 70 20
i hope it gives u some idea .
if its useful rewrd me. -
Hi,
I need to put an authority check before saving in Tcode VK11.
I used BADI SD_COND_SAVE_A to put the checking. I needed to output a message then go back to the same screen with the entered values in the screen still in it.
How Can I make the program go back to the screen with its values.
Below is my code:
AUTHORITY-CHECK OBJECT 'V_KONH_VKO'
ID 'ACTVT' FIELD c_activity
ID 'VTWEG' FIELD v_spart.
IF sy-subrc NE 0.
MESSAGE w012(zsd) WITH v_material.
ENDIF.
Thanks in advance!
Regards,
MarcoHi Kumar,
Thanks for the reply.
This is what Im looking for. But unfortunately it is having an error message ($$00000001 in function group) when ever I would change the values and hit the save button again.
When I debug it, whats happening is that an internal table is not getting refresh in this process thus calling the error message. There is no way I can refresh this table because it is not present in the BADI. -
Condition type not copied to invoice when used from VK11
Hi ,
I have a peculiar situation in which when I add the sales price condition type ZA01 from VK11 in the sale order, the condition type does not get copied into the invoice. But when I add the condition manually in the Sale order the condition type is copied in the invoice.
Can any one suggest what settings need to be made.
Regards
RasheedKindly check, in your condition type: Under Changes which can be made section see what you have maintained in Manual entries.
If above is with option NO limitation then check whether any pricing procedure is maintain for your this Billing Type you are using.
If helpful kindly reward.
Take care.JP. -
Hi,
Can anybody tell me the BAPI name with simple coding to update Condition types for different material, plant, region etc for tcode VK11.
thanks
n kumarHI
VK11,
vk11 bapi
Regards
Pavan -
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 -
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 dynamically . <b>A condition record for every material is to be created for different condition types and different key combinations dynamically where material MATNR is a key field</b> for example i need to create a conditon record for condition type <b>ZPR0,ZPR1</b> etc dynamically for different key combinations.
can anyone of you point out a way to me?
Thanks in advance
ShivakumarHi
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 dynamically . <b>A condition record for every material is to be created for different condition types and different key combinations dynamically where material MATNR is a key field</b> for example i need to create a conditon record for condition type <b>ZPR0,ZPR1</b> etc dynamically for different key combinations.
can anyone of you point out a way to me?
Thanks in advance
Shivakumar -
Pricing condition MM in reference to a SD condition : vendor field in VK11?
Hello everyone,
I am facing a problem with a MM condition type which has been defined in the custo with a SD "Reference condition type" (Reference application "V").
If I want to create the condition record for this condition, I have to use VK11 transaction instead of MEK1.
When I use MEK1 transaction on a classic MM condition, if I go to the "details", I can seize a payment term or the vendor.
But with the condition defined with a SD "Reference condition type", with VK11 transaction the field "vendor" is not reachable in the details tab.
Is there a way to add the field "vendor" in the details tab of the transaction VK11 ?
Thanks a lot for your help,
Benjamin.You can create new access sequence and assgin the particular field in that aceess sequence
-
Pricing condition,automatic display without doing VK11 firstly, how ?
Hi all, another question.
I have a pricing condition in my sale order. and its value is determined by Pricing Conditions Routines with Conditions Value.
How can it automatic display in the condition of my sale order, without doing VK11 firstly.
My english is poor, so I hope u can understand these.Hi
As I said in my previous thread , go to VOFM->Pricing, and check in the requirements if any standard requirements are meeting your requirement or not .If it is not meeting then create a new requirement with the help of technical consultant. and assign the requirement in the Pricing procedure requirement feild for the condition type and then check wheather it is capturing the price or not in the sales order and billing documents.
Regards
Srinath -
Hi all,
I need the clarifiaction for a scenario while creating condition record.
In A911 table for a Material X and Plant 1004 there exist a condition record with Valid From 01/01/2008 and VAlid to 12/31/9999 .
the entry in A911 is as below.
Material Plant Valid From Valid To CondRecordNumber
X 1004 01/01/2008 12/31/9999 0000999001
In vk11 if i create a condition record for the same Material X and Plant 1004 with the Valid From date 01/15/2008 and Valid To date 01/17/2008 the entries in A911 is as follows
Material Plant Valid From Valid To CondRecordNumber
X 1004 01/01/2008 01/14/2008 0000999001
X 1004 01/15/2008 01/17/2008 0000099987
X 1004 01/18/2008 12/31/9999 0000999001
You can notice that first and third row has the same condition number..bcoz of the second record the first record got spilitted and itself created the third row.
My question is if i create a condiion record with this sceanion in Vk11 the records are stored in A911 table like this (shown above).
But when i try to create the condition record with BAPI_PRICES_CONDITON.(where a condition record with valid from date 01/15/2008 and valdi to 01/17/2008)
it is not creating the record..
it only creates a record where the current dates does not fall within the range of any existing records in A911...
if i am wrong anywheer in using the bapi.please let me know.
actually bapi is working ..but not for the scenarion which i have explained.
please help ..points will be rewardedHi Hemavathi,
I guess RCD is your system name and 230 your client. But what software are you running in your system (Menu: System->Status field Component Version)?
Regards,
John. -
Cannot save billing, when the sales price is not maintained in VK11
Dear Expert,
I want to block billing when the sales price is not maintained in VK11?
How to block it?
Thanks
SAP SupportHi,
We cannot have incompletion procedure at the billing document level.It will be happened at the sales order level.
But we can control this one either by using the user exit or any ABAP code.
Goto the T.Code "V/06".Select your condition type.Details.Maintain the value as "A" for the field "Manual entries".
Goto the T.Code "V/08".Select your pricing procedure.Details.
Maintain this condition type as required.
Save.
This ensures that it should fetch values for this condition type automatically i.e. from condition record.Else it will throw an error message.
Regards,
Krishna. -
Restrict a t.code VK11 using Site as authorization object
Hi all,
We want to restrict VK11 t.code using Site as one of the authorizations. By default it has only Sales Org, Distr channel and division. I've added one more field for "Site" manually.
We have defined specific values for Site in authorization objects. Still system does not restrict VK11 executed by user as per site. It works with Sales org/Distr ch/Division. But it does not restrict Site-wise for that role.
Please help.
Regards,
Ankush> I've never got past 'play dead' with such objects
Yip, I know that feeling. It is like when you leave home for a long trip having packed everything you need, but you still have the feeling that you have forgotten something important behind and will kick yourself when you need it.
> Can you please provide step by step instructions for that?
There is no step-by-step procedure nor medication to take for it. You just have to wait for it to dawn on you...
Enjoy the weekend and happy coding authority-checks,
Julius
ps: I heard that this feeling is also caused by the rising popularity of ABAP OO programming techniques, where the checks are often natively imbedded. -
Automatic import of prices in VK11
Is there standard transaction/program in SAP to import sales prices (netered manually in VK11 - condition PR00) from excel file?
Hi,
Please refer the below links...
Bapi for VK11 & VK12
Upload Price records for Condition Type using transaction VK11 and VK12
you can done thru lsmw or BDC as well..
Kuber -
BAPI for T.Code: VK11
How to find the BAPI for transfering data to VK11 T.code.
Sunil.Refer this one -
BAPI_PRICES_CONDITIONS
Sample code -
Re: Sample code for BAPI_PRICES_CONDITIONS
Regards,
Amit
Reward all helpful replies. -
BAPI or BDC Program For pricing VK11
Hi All,
Is there any standard program for pricing VK11 using batch input or send me some coding on Bapi or BDC.
Thanks in Advance.
Arun.
Edited by: Arun Kumaran on Dec 24, 2009 11:40 AMHi,
You can go for BAPI "BAPI_PRICES_CONDITIONS " instead of a BDC.. you could have search in forums first for these type of questions any ways
See the link below..
BDC (VK11)
regards,
NZR
Maybe you are looking for
-
Creation of OORACLE 8i/8iR2 database failed
Hi, I'm having troubles creating databases with Oracle 8i/8iR2, I've used Oracle Universal Installer which returned : "ORA-03114: not connected to ORACLE", I've also tried using "svrmgrl" and Here I got :"ORA-27146: post/wait initialization failed" f
-
Missing Date fields in table maintenance generation
I have some non-key date fields in my custom table and have noticed that they do not get generated on the overview screen of my two-step table maintenance dialog. They are present on the detail screen. If I change the domain of the fields to CHAR the
-
Relation between Inventory Process keys and movement types
Dear All, Is there any way to find the relation between Inventory process keys (which is in SBIW-> Settings for Application specific data sources(PI) -->Logistics -->Settings for IBU Retail / CP --> Transaction key maintenance for SAP BW) and movemen
-
What to do with a powerbook that goes too slow
Wie kan mij helpen mijn apple G4 weer sneller te maken? graag antwoord/tips <Edited by Host>
-
I am trying to obtain a printed listing of the contents of my iTunes library. The 2 approaches I have tried so far have run into the following problems. Using the "Export – Library" function, for importing into MSAccess, seems to hit a limit on the s