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

FM : Read_text and Save_text problem

naimkhans_babi
Active Participant
0 Likes
558

Dear friends

I have used above function module that resutl me into the error.

"that the partner language id is not found,, i have check this thing into STXL table there if i pass all the parameter excluding the name is gives me entries.. but i f i pass the name parameter with 0000000134 it says the result not found where the 134 record is ther into the tab;e also i have check with the only 134 but it says the same... please help me to find out where i am doing the mistakes...i am giving you the code.. any suggestion, code, will be great help of mine,,, i have check this function module without loop and separetly from the program but it resulted the same... please hlep me

thanking you..

regards naim

here is the code...

data: header TYPE thead,

lines TYPE STANDARD TABLE OF tline.

data: "wa_header like line of header,

wa_line like line of lines.

Loop at it_merge into wa_it_merge.

lv_tabix = sy-tabix.

lv_tabix = lv_tabix + 1.

read table it_merge index lv_tabix into wa_it_merge.

if wa_it_merge-a-idnumber = wa_i_casep-a-idnumber.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = '100'

ID = 'Z001'

LANGUAGE = 'E'

NAME = 'wa_it_merge-a-partner'

OBJECT = 'BUT000'

IMPORTING

HEADER = header

TABLES

LINES = lines.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

CLIENT = SY-MANDT

HEADER = header

SAVEMODE_DIRECT = 'X'

IMPORTING

NEWHEADER = header

TABLES

LINES = lines.

endif.

  • loop at header into wa_header.

  • lv_tabix = sy-tabix.

  • lv_tabix = sy-tabix + 1.

  • read table header index lv_tabix into wa_header.

  • if sy-subrc = 0.

  • move-corresponding wa_header to i_case_p.

  • append i_case_p.

  • clear i_case_p.

  • endif.

  • endloop.

loop at lines into wa_line.

lv_tabix = sy-tabix.

lv_tabix = sy-tabix + 1.

read table lines index lv_tabix into wa_line.

if sy-subrc = 0.

move-corresponding wa_line to i_case_p.

append i_case_p.

clear i_case_p.

endif.

endloop.

endloop.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
480
data: header TYPE thead,
lines TYPE STANDARD TABLE OF tline.
data: "wa_header like line of header,
wa_line like line of lines.

Loop at it_merge into wa_it_merge.
lv_tabix = sy-tabix.
lv_tabix = lv_tabix + 1.
read table it_merge index lv_tabix into wa_it_merge.
if wa_it_merge-a-idnumber = wa_i_casep-a-idnumber.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = '100'
ID = 'Z001'
LANGUAGE = 'E'
<b>NAME = 'wa_it_merge-a-partner'</b>  "WRONG
OBJECT = 'BUT000'
IMPORTING
HEADER = header
TABLES
LINES = lines.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = header
SAVEMODE_DIRECT = 'X'
IMPORTING
NEWHEADER = header
TABLES
LINES = lines.
endif.
* loop at header into wa_header.
* lv_tabix = sy-tabix.
* lv_tabix = sy-tabix + 1.
* read table header index lv_tabix into wa_header.
* if sy-subrc = 0.
* move-corresponding wa_header to i_case_p.
* append i_case_p.
* clear i_case_p.
* endif.
* endloop.
loop at lines into wa_line.
lv_tabix = sy-tabix.
lv_tabix = sy-tabix + 1.
read table lines index lv_tabix into wa_line.
if sy-subrc = 0.
move-corresponding wa_line to i_case_p.
append i_case_p.
clear i_case_p.
endif.
endloop.
endloop.

Dear friends

I have used above function module that resutl me into the error.

"that the partner language id is not found,, i have check this thing into STXL table there if i pass all the parameter excluding the name is gives me entries.. but i f i pass the name parameter with 0000000134 it says the result not found where the 134 record is ther into the tab;e also i have check with the only 134 but it says the same... please help me to find out where i am doing the mistakes...i am giving you the code.. any suggestion, code, will be great help of mine,,, i have check this function module without loop and separetly from the program but it resulted the same... please hlep me

thanking you..

regards naim

here is the code...

data: header TYPE thead,

lines TYPE STANDARD TABLE OF tline.

data: "wa_header like line of header,

wa_line like line of lines.

Loop at it_merge into wa_it_merge.

lv_tabix = sy-tabix.

lv_tabix = lv_tabix + 1.

read table it_merge index lv_tabix into wa_it_merge.

if wa_it_merge-a-idnumber = wa_i_casep-a-idnumber.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = '100'

ID = 'Z001'

LANGUAGE = 'E'

NAME = 'wa_it_merge-a-partner'

OBJECT = 'BUT000'

IMPORTING

HEADER = header

TABLES

LINES = lines.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

CLIENT = SY-MANDT

HEADER = header

SAVEMODE_DIRECT = 'X'

IMPORTING

NEWHEADER = header

TABLES

LINES = lines.

endif.

  • loop at header into wa_header.

  • lv_tabix = sy-tabix.

  • lv_tabix = sy-tabix + 1.

  • read table header index lv_tabix into wa_header.

  • if sy-subrc = 0.

  • move-corresponding wa_header to i_case_p.

  • append i_case_p.

  • clear i_case_p.

  • endif.

  • endloop.

loop at lines into wa_line.

lv_tabix = sy-tabix.

lv_tabix = sy-tabix + 1.

read table lines index lv_tabix into wa_line.

if sy-subrc = 0.

move-corresponding wa_line to i_case_p.

append i_case_p.

clear i_case_p.

endif.

endloop.

endloop.

3 REPLIES 3
Read only

Former Member
0 Likes
481
data: header TYPE thead,
lines TYPE STANDARD TABLE OF tline.
data: "wa_header like line of header,
wa_line like line of lines.

Loop at it_merge into wa_it_merge.
lv_tabix = sy-tabix.
lv_tabix = lv_tabix + 1.
read table it_merge index lv_tabix into wa_it_merge.
if wa_it_merge-a-idnumber = wa_i_casep-a-idnumber.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = '100'
ID = 'Z001'
LANGUAGE = 'E'
<b>NAME = 'wa_it_merge-a-partner'</b>  "WRONG
OBJECT = 'BUT000'
IMPORTING
HEADER = header
TABLES
LINES = lines.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = header
SAVEMODE_DIRECT = 'X'
IMPORTING
NEWHEADER = header
TABLES
LINES = lines.
endif.
* loop at header into wa_header.
* lv_tabix = sy-tabix.
* lv_tabix = sy-tabix + 1.
* read table header index lv_tabix into wa_header.
* if sy-subrc = 0.
* move-corresponding wa_header to i_case_p.
* append i_case_p.
* clear i_case_p.
* endif.
* endloop.
loop at lines into wa_line.
lv_tabix = sy-tabix.
lv_tabix = sy-tabix + 1.
read table lines index lv_tabix into wa_line.
if sy-subrc = 0.
move-corresponding wa_line to i_case_p.
append i_case_p.
clear i_case_p.
endif.
endloop.
endloop.
Read only

0 Likes
480
<b>data: name type tdname.

NAME = wa_it_merge-a-partner.</b>

data: header TYPE thead,
lines TYPE STANDARD TABLE OF tline.
data: "wa_header like line of header,
wa_line like line of lines.
 
Loop at it_merge into wa_it_merge.
lv_tabix = sy-tabix.
lv_tabix = lv_tabix + 1.
read table it_merge index lv_tabix into wa_it_merge.
if wa_it_merge-a-idnumber = wa_i_casep-a-idnumber.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = '100'
ID = 'Z001'
LANGUAGE = 'E'
<b>NAME = name </b>   
OBJECT = 'BUT000'
IMPORTING
HEADER = header
TABLES
LINES = lines.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = header
SAVEMODE_DIRECT = 'X'
IMPORTING
NEWHEADER = header
TABLES
LINES = lines.
endif.
* loop at header into wa_header.
* lv_tabix = sy-tabix.
* lv_tabix = sy-tabix + 1.
* read table header index lv_tabix into wa_header.
* if sy-subrc = 0.
* move-corresponding wa_header to i_case_p.
* append i_case_p.
* clear i_case_p.
* endif.
* endloop.
loop at lines into wa_line.
lv_tabix = sy-tabix.
lv_tabix = sy-tabix + 1.
read table lines index lv_tabix into wa_line.
if sy-subrc = 0.
move-corresponding wa_line to i_case_p.
append i_case_p.
clear i_case_p.
endif.
endloop.
endloop.

try this way...

Read only

Former Member
0 Likes
480

Naim,

There are two problems in your source code,see:

1)

the code is commented and you created a new variable,

but no used in your function.

data: "wa_header like line of header,

wa_line like line of lines.

2) You pass the hard code:

NAME = 'wa_it_merge-a-partner' -> incorret

NAME = wa_it_merge-a-partner -> corret, without ''.

best regards,

Alexandre