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

Customer master Long text

Former Member
0 Likes
2,352

When i use FM read_text to get the text of customer in a program for every customer in knvv table i am facing error for some customers text is not found. how to skip the customers who doesnt have text entry and which table can i find the customer is having text or not?.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,004

I'm not sure if I understand. You are getting an error when the text is not found?

Do you have the Exceptions commented out in your Call to the FM?

If so, please un-comment them.

Sorry if I misunderstood your problem.

I'm not sure if I understand. You are getting an error when the text is not found?

Do you have the Exceptions commented out in your Call to the FM?

If so, please un-comment them.

Sorry if I misunderstood your problem.

9 REPLIES 9
Read only

Former Member
0 Likes
2,004

Hi,

You can write a Simple select before the READ_TEXT.look at the table KNVT based on the field TXTID.

Select Single TXTID into G_TXTID from KNVT where KUNNR = KUNNR.

if sy-subrc = 0.

write the Read_text.

ENDIF.

In the Above select, you can use the field TEXNR also

Regards

Sudheer

Read only

0 Likes
2,004

I am not finiding any entries in knvt table but there is a text for customer in fd32 transaction. i need to find the customer having text in fd32 transaction.

Read only

0 Likes
2,004

Hi,

To know customer who have text.

You can select all the customer, and then loop at them, and check the READ_TEXT return code.

Regards,

Erwan

Read only

0 Likes
2,004

I think you can get the long texts from table STXH

give your Text number as Text id

but i am not sure, seen in some threads

Read only

0 Likes
2,004

could you help me out hoe to check the return code

thanks

Read only

Former Member
0 Likes
2,005

I'm not sure if I understand. You are getting an error when the text is not found?

Do you have the Exceptions commented out in your Call to the FM?

If so, please un-comment them.

Sorry if I misunderstood your problem.

Read only

0 Likes
2,004

I have already un-commented the exceptions in FM read_text. but how to skip passing values to function module for the customers doesnt have long text. since the program stops in the middle when it finds there is no text for customers.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = '0001'

LANGUAGE = sy-langu

NAME = v_name

OBJECT = 'KNKK'

Eg. v_name contains '00000100000070'

1000 is customer 0070 is credit control area.

Read only

0 Likes
2,004

Add the exception following the FM ( in order to avoid the dump !) then test the sy-subrc !


(...)
    exceptions
      id                      = 1
      language                = 2
      name                    = 3
      not_found               = 4
      object                  = 5
      reference_check         = 6
      wrong_access_to_archive = 7
      others                  = 8.
If sy-subrc ne 0.
* no text
endif.

Message was edited by:

Erwan LE BRUN

Read only

0 Likes
2,004

TYou can use those same values to check the STXH table before calling the function module. If there is an entry in STXH, then there will be text available to the function module.