cancel
Showing results for 
Search instead for 
Did you mean: 

to upload the price in the condition record

Former Member
0 Kudos

Dear all,

i want to upload the amount in the record,my record combination is sales org /material.I have to upload for 1000 materails.those 1000 materails with amount i have in exel.

Now i want to create record,when i copy and paste in the record,at a time 20 material with amount only i could be able to copy.

is there any solution other than lsmw to create record for 1000 material 1 at a time

venu

Accepted Solutions (1)

Accepted Solutions (1)

safeer_rahman2
Contributor
0 Kudos

HI Venu...

LSMW /BDC is the best option which i could suggest you for the updation of condtion records.

In case if you need help on how to work with LSMW... Kindly let us know...

Thanks,

Safeer Rahman

Former Member
0 Kudos

Hi Safeer,

can you help me in lsmw,becuase i have searched for lsmw,couldnt get the right one.i have uploaded cmr tro lsmw and not this condition record.

if you can help me in uploading the condition record using lsmw it will helpful...

venu

safeer_rahman2
Contributor
0 Kudos

Dear Venu...

Let me try to narrate you steps in uploading the condition records via LSMW.

1.Go to the Tcode LSMW

2.Create the project , Subproject and Object with the description

3.Change Object attributes-maintain the object type standard as 070 Condition record

4.Goto change source field and position the curson on your condition and create new fields..

KOTABN

KSCHL

VAKEY

DATBI

DATAB

KBETR C(010) Amount

KONWA C(005) Rate Unit of Currenc

KMEIN C(002) Condition Units eg E

5.Maintain Structure Relations-Click on the relation ship button on the top against the Records BGR00 , BKOND1 and BKOND2.

6.Maintain Field Mapping and Conversion Rules as follows.

BGR00 Batch Input Structure for Session Data

Fields

XKEEP Indicator: Keep Batch Input Session After Processing ?

Rule : Default Settings Modified

Code: BGR00-XKEEP = 'X'.

BKOND1 Batch input structure for header data

Fields

TCODE Transaction Code

Code: BKOND1-TCODE = 'VK15'.

KVEWE Usage of the condition table

Rule : Constant

Code: BKOND1-KVEWE = 'A'.

KOTABNR Condition table batch input

Source: CONDITIONS-KOTABNR ()

Rule : Transfer (MOVE)

Code: BKOND1-KOTABNR = CONDITIONS-KOTABNR.

KAPPL Application

Rule : Constant

Code: BKOND1-KAPPL = 'V'.

KSCHL Condition type

Source: CONDITIONS-KSCHL ()

Rule : Transfer (MOVE)

Code: BKOND1-KSCHL = CONDITIONS-KSCHL.

BKOND2 Batch input structure for main data

Fields

PRICING - STANDARD UK Pricing Conditions - BAS and CON

Fields

VAKEY Variable key 100 bytes

Source: CONDITIONS-VAKEY ()

Code: BKOND2-VAKEY = CONDITIONS-VAKEY.

DATBI Validity end date of the condition record

Source: CONDITIONS-DATBI ()

Rule : Transfer (MOVE)

Code: BKOND2-DATBI = CONDITIONS-DATBI.

  • Caution: Source field is longer than target field

DATAB Validity start date of the condition record

Source: CONDITIONS-DATAB ()

Rule : Transfer (MOVE)

Code: BKOND2-DATAB = CONDITIONS-DATAB.

  • Caution: Source field is longer than target field

KBETR Amount field for batch input

Source: CONDITIONS-KBETR (Amount)

Rule : Transfer (MOVE)

Code: BKOND2-KBETR = CONDITIONS-KBETR.

KONWA R/2 table

Source: CONDITIONS-KONWA (Rate Unit of Currency)

Rule : Transfer (MOVE)

Code: BKOND2-KONWA = CONDITIONS-KONWA.

KPEIN R/2 table

KMEIN 3-Byte field

Rule : Constant

Code: BKOND2-KMEIN = 'EA'.

MWSK1 Tax on Sales/Purchases Code

KONMS Condition scale unit of measure

MXWRT Amount field for batch input

GKWRT Amount field for batch input

STFKZ Scale Type

KZNEP Condition exclusion indicator

LOEVM_KO Deletion Indicator for Condition Item

SKONWA R/2 table

Maintain Fixed Values, Translation

7 Specify Files - Specify the path where you are going to keep the load files (flat files in Notepad) for the legacy data

8 Assign Files - assign the files

Once you are done with all the above steps jsut execute the following steps....

9 Read Data

10 Display Read Data

11 Convert Data

12 Display Converted Data

13 Create Batch Input and Finally

14. Run Batch Input session...

So that it should work...

Thanks,

Safeer Rahman

safeer_rahman2
Contributor
0 Kudos

HI Venu..

Normally you need the help of an ABAPer to design an LSMW as above.As a funcitional consultant you may have to write only an FRS to get this done... In case if your client requires the use of this program on regular intervals... You can design the LSMW with your ABAPer..

Also go through this link...

[LSMW overview|http://www.sap-img.com/general/lsmw-steps-for-data-migration.htm]

[Step by Step view|http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc]

[LSMW with Example|http://www.sap123.com/showthread.php?t=55]

HOpe this helps..

Thanks,

Safeer Rahman

safeer_rahman2
Contributor
0 Kudos

Dear Venu..

Thanks... Though you got a solution for your query...I would also like to suggest you an alternative way...

To upload the condtion records ,SAP does make the provision by using the program RV14BTCI.

Why dont you give it a try...?

Thanks,

Safeer Rahman

Former Member
0 Kudos

hi safeer,

can you elobrate,in using the program for uploading condition record

former_member189596
Active Participant
0 Kudos

Hi ,

Please guide me how to use this program for conditionrecords,

Thanks in advacne,

regards,

Bhaskar

Answers (3)

Answers (3)

Former Member
0 Kudos

Option 1:

Develop a upload Program in Abap with a new T.Code with 'Z'.

Option 2:

Through LSMW / ECATT / BDC

Incase, it will be a regular activity, then option 1 will be better option.

Regards,

Rajesh Banka

Former Member
0 Kudos

Hi ,

You can upload the records via S - CATT or e- CATT or BDC procedure ;if you do not want to go for LSMW.

Though time consuming, copy and pasting the records is a simpler option.

Hope it helps .

Regards

Former Member
0 Kudos

Hi,

LSMW is a good-option, however, if you are not interested to use LSMW; You may Run BDC-Program upload.

Following is for your further understanding:

General flow of a BDC program is like this....

1) First create recording for the T code which you want to make BDC for... Use T code SHDB for recording.

2 ) Now save that recording and create pogram from that recording using Create Program button. give the BDC driver program name and create.

3 ) Now the general logic of BDC program goes like this....

- Upload Flat file into and internal table using function module "UPLOAD"

- OPEN BDC GROUP.

- Now loop at that internal table which contains the data from flat file.

- move data from internal table to fields of BDCDATA using automatically gebnerated code from BDC.

- CALL TRANSACTION <T CODE> using BDCDATA...

- CLOSE BDC GROUP

A sample program for the same is attatched here for your referance... just go through it..

report ztej_test_new no standard page heading line-size 255.

data bdcdata like bdcdata occurs 0 with header line.

tables: zipcldesigcat.

data : begin of itab occurs 0,

mandt like zipcldesigcat-mandt,

zdesigncd like zipcldesigcat-zdesigncd,

zdesignation like zipcldesigcat-zdesignation,

zdesigcat like zipcldesigcat-zdesigcat,

end of itab.

*INCLUDE bdcrecx1.

start-of-selection.

perform upload.

perform open.

loop at itab.

perform move.

call transaction 'SE16' using bdcdata mode 'E'.

refresh bdcdata.

endloop.

perform close.

&----


*& Form UPLOAD

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form upload.

call function 'UPLOAD'

exporting

  • CODEPAGE = ''

filename = ''

filetype = 'DAT'

item = 'Your File'

  • FILEMASK_MASK = ' '

  • FILEMASK_TEXT = ' '

  • FILETYPE_NO_CHANGE = ' '

  • FILEMASK_ALL = ' '

  • FILETYPE_NO_SHOW = ' '

  • LINE_EXIT = ' '

  • USER_FORM = ' '

  • USER_PROG = ' '

  • SILENT = 'S'

  • IMPORTING

  • FILESIZE =

  • CANCEL =

  • ACT_FILENAME =

  • ACT_FILETYPE =

tables

data_tab = itab

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.

*CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

  • EXPORTING

  • filename = 'C:\TEST.XLS'

  • i_begin_col = 1

  • i_begin_row = 1

  • i_end_col = 3

  • i_end_row = 5

  • tables

  • intern = ITAB

  • EXCEPTIONS

  • INCONSISTENT_PARAMETERS = 1

  • UPLOAD_OLE = 2

  • OTHERS = 3

  • .

*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. " UPLOAD

----


  • Start new screen *

----


form bdc_dynpro using program dynpro.

clear bdcdata.

bdcdata-program = program.

bdcdata-dynpro = dynpro.

bdcdata-dynbegin = 'X'.

append bdcdata.

endform.

----


  • Insert field *

----


form bdc_field using fnam fval.

if fval <> space.

clear bdcdata.

bdcdata-fnam = fnam.

bdcdata-fval = fval.

append bdcdata.

endif.

endform.

&----


*& Form OPEN

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form open.

call function 'BDC_OPEN_GROUP'

exporting

client = sy-mandt

  • DEST = FILLER8

group = 'ZDESIGCAT_R'

  • HOLDDATE = FILLER8

  • KEEP = FILLER1

user = sy-uname

  • RECORD = FILLER1

  • IMPORTING

  • QID =

exceptions

client_invalid = 1

destination_invalid = 2

group_invalid = 3

group_is_locked = 4

holddate_invalid = 5

internal_error = 6

queue_error = 7

running = 8

system_lock_error = 9

user_invalid = 10

others = 11

.

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. " OPEN

&----


*& Form MOVE

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form move.

perform bdc_dynpro using 'SAPLSETB' '0230'.

perform bdc_field using 'BDC_CURSOR'

'DATABROWSE-TABLENAME'.

perform bdc_field using 'BDC_OKCODE'

'=ANLE'.

perform bdc_field using 'DATABROWSE-TABLENAME'

'ZIPCLDESIGCAT'.

perform bdc_dynpro using 'SAPLZIPCLDESIGCAT' '0001'.

perform bdc_field using 'BDC_CURSOR'

'VIM_POSITION_INFO'.

perform bdc_field using 'BDC_OKCODE'

'=NEWL'.

perform bdc_dynpro using 'SAPLZIPCLDESIGCAT' '0001'.

perform bdc_field using 'BDC_CURSOR'

'ZIPCLDESIGCAT-ZDESIGCAT(01)'.

perform bdc_field using 'BDC_OKCODE'

'=SAVE'.

perform bdc_field using 'ZIPCLDESIGCAT-ZDESIGNCD(01)'

'2101'.

perform bdc_field using 'ZIPCLDESIGCAT-ZDESIGNATION(01)'

'new'.

perform bdc_field using 'ZIPCLDESIGCAT-ZDESIGCAT(01)'

'n'.

perform bdc_dynpro using 'SAPLZIPCLDESIGCAT' '0001'.

perform bdc_field using 'BDC_CURSOR'

'ZIPCLDESIGCAT-ZDESIGNCD(02)'.

perform bdc_field using 'BDC_OKCODE'

'=ENDE'.

perform bdc_dynpro using 'SAPLSETB' '0230'.

perform bdc_field using 'BDC_OKCODE'

'/EEND'.

perform bdc_field using 'BDC_CURSOR'

'DATABROWSE-TABLENAME'.

endform. " MOVE

&----


*& Form CLOSE

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form close.

call function 'BDC_CLOSE_GROUP'

exceptions

not_open = 1

queue_error = 2

others = 3.

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. " CLOSE

Best Regards,

Amit