2012 Jul 31 2:10 PM
Hi
I am trying to use BAPI to create material master (MM01) where i need to read the data from the application server and upload.I need to schedule a background job for this.
Now the problem is with long text.how can i upload the long text from that flat file.I tried with the table parameter MATERIALLONGTEXT but it is not working.
Please help...
Regards
Vamshi
Hi,
In BAPI structure MATERIALLONGTEXT am passing the following
APPLOBJECT-- MATERIAL
TEXT_NAME -- mat. no.
TEXT--BEST
LAN--EN
Text_line-- long text
but it is throwing an error material number in initial.
2012 Jul 31 2:40 PM
Hi,
The BAPI works well as far as I know. Can you please paste your code ?
2012 Aug 01 6:41 AM
Hi,
In BAPI structure MATERIALLONGTEXT am passing the following
APPLOBJECT-- MATERIAL
TEXT_NAME -- mat. no.
TEXT--BEST
LAN--EN
Text_line-- long text
but it is throwing an error material number in initial.
2012 Aug 01 7:44 AM
Hi again,
I believe that you have internal numbering so the material number is not yet known when you call the BAPI. I'm not sure if you can somehow bypass this but you could try the following :
Call the bapi without longtext in order to create the material and get the newly created material number.
Call the bapi again passing only the longtexts for the material number just created.
Another way is to use 'SAVE_TEXT' FM again when you know the material number.
Regards.
2012 Aug 01 10:02 AM
Hi,
Also, the reason of the error might be that you passing some parameters in BAPI which is not allowed in creating a material, but only allowed in updating alredy an existing material. Such parameters might be VALUATIONDATA, for instance. If so, then you should call bapi twice - first to create material, second to update it passing VALUATIONDATA. Thereby, if you get data from file to creat materials, you shoul have two record for each material. One to create an initial material another to bring it additional data including VALUATIONDATA, MATERIALLONGTEXT , etc...
Hope it helps,
Zhumabek
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |