Application Development 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: 

CSAP_MAT_BOM_MAINTAIN Not Updating BOM Item Long Text Properly

Former Member
0 Kudos

Hello,

I am trying to update material bom details using function module CSAP_MAT_BOM_MAINTAIN using RFC from external application. This includes the item long text updation. I am passing more than three lines text in parameter table T_LTX_LINE (means greater than 80 chars). I checked incoming parameter values, it looks input parameters are coming properly passed by external application.It's updating perfect except item long text. It updates only upto 80 chars length. When I try to display BOM item long text in CS03, it gives me error "Long text does not exists". If I run this function module in SAP directly, it updates long text perfectly.

When I set external break point and update in debugg more, it's updating perfectly including item long text. When I run external application without break points then only it gives error of "Long text does not exists".

Please help me resolving this strange problem.

The sample code is as below.

CALL FUNCTION 'CSAP_MAT_BOM_MAINTAIN'

EXPORTING

material = l_parent_material_no

plant = p_plant

bom_usage = l_bom_usage

alternative = l_alternative

change_no = p_change_no

i_stko = l_stko_in

fl_bom_create = 'X'

fl_new_item = 'X'

fl_commit_and_wait = 'X'

fl_complete = 'X'

IMPORTING

fl_warning = l_fl_warning

o_stko = lt_stko

TABLES

t_stpo = lt_stpo

t_ltx_line = lt_ltx_line

EXCEPTIONS

error = 1

OTHERS = 2.

Regards,

Ajitrao

2 REPLIES 2

Former Member
0 Kudos
HI,
I know it's a old subject but i just find the solution so to update long text feel the field
object_id in the table typed csltx_line for all the line you want to put in the header
with the below value:

* object_id = 0: Stücklistentext (STZU)  (-> CS_DI_BOM_UPDATE)
*           = 1: Alternativentext (STKO)
*           = 2: Positionstext (STPO)

Regards

0 Kudos

Hi Ajit,

I am having the same issue now. Did you find the solution for this ?

Thanks.