Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Uploading Basic Data Longtext into Material Master

Former Member
0 Likes
2,830

Hi Experts,

While creating material master i need to upload Basic Data Long text into material master.

For this iam using a BDC.How we can get this long text into sap systen and how we will update in material master.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,429

See the Function modules containing TEXT in the name, particularly in function group STXD. Essentially, you will construct an internal table in the proper format (TLINE) in your program for each material, along a structure of type THEAD, and call function module SAVE_TEXT, if it is a new material. If updating, one does read_text, modifies the text obtained, deletes the existing text and the does SAVE_TEXT using the modified data in the internal table, as I recall. I would suggest doing the text processing after you have successful update/create of the material.

5 REPLIES 5
Read only

Former Member
0 Likes
1,430

See the Function modules containing TEXT in the name, particularly in function group STXD. Essentially, you will construct an internal table in the proper format (TLINE) in your program for each material, along a structure of type THEAD, and call function module SAVE_TEXT, if it is a new material. If updating, one does read_text, modifies the text obtained, deletes the existing text and the does SAVE_TEXT using the modified data in the internal table, as I recall. I would suggest doing the text processing after you have successful update/create of the material.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,429

Not sure why you are using the BDC approach to upload MM data

You should use the BAPI 'BAPI_MATERIAL_SAVEDATA'. Anyways back to your question on how to maintain Basic Data Longtext into MM check this thread:

Read only

Former Member
1,429

Hi,

you can use the below function module instead of Save_text..


BAPI_MATERIAL_SAVEDATA.

in the above function module 

    headdata-material = matnr.

    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        headdata             = headdata   "contains materail number
      IMPORTING
        return               = return
      TABLES
        MATERIALLONGTEXT = t_longtext   "pass long text here
        returnmessages       = returnmessages.

Prabhudas

Read only

Former Member
0 Likes
1,429

Hi Thanks for all your replies

Here my requirement is i have to create material based upon the flat file and needs to update the long text.

Edited by: vinay raj on Aug 18, 2010 1:46 PM

Read only

Former Member
0 Likes
1,429

closed