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

HEader Line Issue

Former Member
0 Likes
1,042

Hi All,

Previously i have declared a data as

DATA: BEGIN OF t_temp OCCURS 10,

vbeln TYPE char10,

END OF t_temp.

<code continues>

LOOP AT t_data INTO fs_data.

IF NOT fs_data-del_no IS INITIAL.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = fs_data-del_no

IMPORTING

output = t_temp-vbeln.

COLLECT t_temp.

ENDIF.

APPEND LINES OF t_TYPE_temp TO T_ty_vbeln

With the above i am able to fetch the data in in t_temp.

I have changed the data declarations as

TYPES: BEGIN OF tYPE_temp,

vbeln TYPE char10,

END OF tYPE_temp.

DATA: FS_TYPE_TEMP TYPE TYPE_TEMP,

T_TYPE_TEMP TYPE STANDARD TABLE OF TYPE_TEMP.

And the same loop i am using as shown below.

LOOP AT t_data INTO fs_data.

IF NOT fs_data-del_no IS INITIAL.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = fs_data-del_no

IMPORTING

output = t_type_temp-vbeln.

COLLECT t_type_temp.

ENDIF.

APPEND LINES OF t_TYPE_temp TO T_ty_vbeln

In the above case i am getting error as t_type_temp is a table without header line and

therefore has no component called "VBELN". What changes has to be done.

Regards

VEnk@

Edited by: Venkat Reddy on Nov 13, 2009 11:30 AM

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,001

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = fs_data-del_no

IMPORTING

output = FS_TYPE_TEMP-vbeln."<---

COLLECT FS_TYPE_TEMP into t_type_temp.

CLEAR FS_TYPE_TEMP.

ENDIF.

8 REPLIES 8
Read only

Former Member
0 Likes
1,001

Hi Venkat,

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = fs_data-del_no

IMPORTING

output = t_type_temp-vbeln.

Here in the Importing part you have given the table directly instead of workarea

In the first code u have declared work area in the table declaration itself as headerline.

Read only

Former Member
0 Likes
1,001

Hi,

Change it like FS_TYPE_TEMP-VBELN instead of t_type_temp-VBELN

OOP AT t_data INTO fs_data.
IF NOT fs_data-del_no IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = fs_data-del_no
IMPORTING
output = FS_TYPE_TEMP-VBELN. "Change
 
COLLECT t_type_temp.
ENDIF.

Regards

Read only

0 Likes
1,001

hI

I did changes as suggested but i am getting error as "FS_type_temp-vbeln" is not a table with header line.

Edited by: Venkat Reddy on Nov 13, 2009 11:35 AM

Edited by: Venkat Reddy on Nov 13, 2009 11:35 AM

Read only

0 Likes
1,001

Hi,

I guess in

input = fs_data-del_no

fs_data was previously a table with header line. so above statement will work.

Now you have to replace fs_data with a work area as well

Regards

Read only

0 Likes
1,001

Hi,

At which point are you getting this error, as i am not getting it. Check the below code

TYPES: BEGIN OF tYPE_temp,
vbeln TYPE char10,
END OF tYPE_temp.

DATA: FS_TYPE_TEMP TYPE TYPE_TEMP,
T_TYPE_TEMP TYPE  TABLE OF TYPE_TEMP.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input  = FS_type_temp-vbeln
  IMPORTING
    output = FS_type_temp-vbeln.

Regards

Read only

0 Likes
1,001

Hello try this way:

IF NOT fs_data-del_no IS INITIAL.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = fs_data-del_no

IMPORTING

output = FS_TYPE_TEMP-VBELN.

COLLECT fs_type_temp into t_type_temp.

ENDIF.

Regards,

Swarna Munukoti.

Read only

Former Member
0 Likes
1,001

HI ,

you write the code as like this..

TYPES: BEGIN OF type_temp,

vbeln TYPE char10,

END OF type_temp.

DATA: FS_TYPE_TEMP TYPE TYPE_TEMP,

T_TYPE_TEMP TYPE STANDARD TABLE OF TYPE_TEMP.

And the same loop i am using as shown below.

LOOP AT t_data INTO fs_data..

IF NOT fs_data-del_no IS INITIAL.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = fs_data-del_no

IMPORTING

output = FS_TYPE_TEMP-vbeln.

APPEND FS_TYPE_TEMP TO T_TYPE_TEMP

ENDIF.

endloop.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,002

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = fs_data-del_no

IMPORTING

output = FS_TYPE_TEMP-vbeln."<---

COLLECT FS_TYPE_TEMP into t_type_temp.

CLEAR FS_TYPE_TEMP.

ENDIF.