on 10-14-2008 5:42 AM
Hi Experts,
While using BAPI_PRICES_CONDITIONS for VK11 transaction to create pricing conditon records , the date range split is not happening ..
i.e it creates the entry but not splitting the date range.
For eg:
When I try to create a pricing condition with date range as 14.10.2008 to 31.12.2008 , it is working fine and creates new entry,
But when I try to create 20.10.2008 to 25.10.2008 , actually it has to create entries as
14.10.2008 to 19.10.2008
20.10.2008 to 25.10.2008
26.10.2008 to 31.12.2008
i.e date should splited up
But I creates only 20.10.2008 to 25.10.2008 and it deletes(or replaces) the old entry 14.10.2008 to 31.12.2008
Is there any other BAPI available to achieve this ???.
Any useful inputs is really helpful.
Thanks ~ Lakshmiraj
Hi lakshmiraj,
Better way wud be to create a BDC with VK11 recording, where user will be uploading all conditions from an excel sheet.
also try FM VBDRV_CONDITION_RECORDS_SAVE
Regards,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
Thanks for your reply.
Actually the program having two options
1. Manual processing
2. Automatic upload.
In Manual , BDC of VK11 is used along with the same BAPI
In Automatic upload ,only the same BAPI is used.
Please let me know what is use of this BAPI or where its documentation available.
Thanks!!
Hi,
the client in which i did this bdc is on 4.7..so bdc recording & screen wud be wrt 4.7 only..u wud need to do the recording again if any problems arise..my code wud be just to help u with the logic.
here it is:
*********************************************************
REPORT zbdc_vk11
NO STANDARD PAGE HEADING LINE-SIZE 255.
INCLUDE bdcrecx1.
PARAMETER:pr_file LIKE rlgrap-filename OBLIGATORY.
DATA: w_filenm LIKE rlgrap-filename.
DATA: rawdata(4096) TYPE c OCCURS 0.
DATA: BEGIN OF itab OCCURS 0,
kschl(4) TYPE c,
vkorg(4) TYPE c,
vtweg(2) TYPE c,
prodh1(1) TYPE c,
mfrgr(8) TYPE c,
zzprodh4(1) TYPE c,
werks(4) TYPE c,
kbetr(11) TYPE c,
konwa(5) TYPE c,
kpein(5) TYPE c,
kmein(3) TYPE c,
krech(1) TYPE c,
datab(10) TYPE c,
datbi(10) TYPE c,
END OF itab.
DATA : itab1 LIKE STANDARD TABLE OF itab WITH HEADER LINE.
DATA : channel(2) TYPE n VALUE 07.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = pr_file
mask = ',*.xls.'
mode = 'O'
title = 'Upload File'(i03)
IMPORTING
filename = pr_file
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
START-OF-SELECTION.
WRITE pr_file TO w_filenm.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER =
i_tab_raw_data = rawdata
i_filename = w_filenm
TABLES
i_tab_converted_data = itab
EXCEPTIONS
conversion_failed = 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.
********************************************************************
LOOP AT itab.
MOVE-CORRESPONDING itab TO itab1.
APPEND itab1.
DO 10 TIMES.
IF channel = 13.
channel = 17.
ENDIF.
READ TABLE itab1 INDEX sy-tabix.
itab1-vkorg = 1100.
itab1-vtweg = channel.
APPEND itab1.
channel = channel + 1.
IF channel > 18.
EXIT.
ENDIF.
ENDDO.
channel = 07.
CLEAR itab1.
ENDLOOP.
********************************************************************
PERFORM open_group.
LOOP AT itab1.
PERFORM bdc_dynpro USING 'SAPMV13A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV13A-KSCHL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RV13A-KSCHL'
itab1-kschl.
PERFORM bdc_dynpro USING 'SAPLV14A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV130-SELKZ(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_field USING 'RV130-SELKZ(01)'
''.
PERFORM bdc_field USING 'RV130-SELKZ(02)'
'X'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1972'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV13A-DATBI(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'KOMG-VKORG'
itab1-vkorg.
PERFORM bdc_field USING 'KOMG-VTWEG'
itab1-vtweg.
PERFORM bdc_field USING 'KOMG-PRODH1'
itab1-prodh1.
PERFORM bdc_field USING 'KOMG-MFRGR'
itab1-mfrgr.
PERFORM bdc_field USING 'KOMG-ZZPRODH4'
itab1-zzprodh4.
PERFORM bdc_field USING 'KOMG-WERKS(01)'
itab1-werks.
PERFORM bdc_field USING 'KONP-KBETR(01)'
itab1-kbetr.
PERFORM bdc_field USING 'KONP-KONWA(01)'
itab1-konwa.
PERFORM bdc_field USING 'KONP-KPEIN(01)'
itab1-kpein.
PERFORM bdc_field USING 'KONP-KMEIN(01)'
itab1-kmein.
PERFORM bdc_field USING 'RV13A-KRECH(01)'
itab1-krech.
PERFORM bdc_field USING 'RV13A-DATAB(01)'
itab1-datab.
PERFORM bdc_field USING 'RV13A-DATBI(01)'
itab1-datbi.
PERFORM bdc_dynpro USING 'SAPMV13A' '1972'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMG-WERKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
PERFORM bdc_transaction USING 'VK11'.
CLEAR itab1.
ENDLOOP.
PERFORM close_group.
Regards,
Amit
Hi
You can use FM RV_CONDITION_COPY, If you are not calling from remote server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
sorry.
regards
Prabhu
Edited by: Prabhu Peram on Oct 14, 2008 1:47 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I think BAPI_PRICES_CONDITIONS is not yet released for usage
Regards
Madhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.