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

Table without a header line error

Former Member
25,490

I have this code.

DATA: lt_httpnvp TYPE TABLE OF TIHTTPNVP,
      ls_httpnvp type TIHTTPNVP.


lt_httpnvp-name = 'WF_USERID'.
lt_httpnvp-value = 'yy029672'.


append ls_httpnvp-value to lt_httpnvp.

it give me an erro

LT_HTTPNVP is a table without a header line and therefore has no

component called "NAME

LT_HTTPNVP is a table without a header line and therefore has no

component called "VALUE

Please help me in this.

BR,

1 ACCEPTED SOLUTION
Read only

former_member402443
Contributor
0 Likes
8,706

Hi Ali,

Modify the code to :

TIHTTPNVP is a table type so you have to declare it as mention below.

DATA: lt_httpnvp TYPE TIHTTPNVP,

ls_httpnvp LIKE LINE OF lt_httpnvp.

ls_httpnvp-name = 'WF_USERID'.

ls_httpnvp-value = 'yy029672'.

append ls_httpnvp-value to lt_httpnvp.

Regard

Manoj Kumar

12 REPLIES 12
Read only

abhimanyu_lagishetti7
Active Contributor
0 Likes
8,706

Modify the code to.

DATA: lt_httpnvp TYPE TABLE OF TIHTTPNVP,

ls_httpnvp type TIHTTPNVP.

ls_httpnvp-name = 'WF_USERID'.

ls_httpnvp-value = 'yy029672'.

append ls_httpnvp to lt_httpnvp.

Close this thread, you can continue in the same thread.. which you posted earlier.

Abhi

Read only

0 Likes
8,706

Hi Abhi,

I recode as u reply but nothing change, it gives me same error message.

Read only

0 Likes
8,706

ls_httpnvp-name = 'WF_USERID'.

ls_httpnvp-value = 'yy029672'.

it is ls not lt.

Read only

0 Likes
8,706

hi Abhimanyu Lagishetti ,

I did as u told noting change.

same error message.

BR,

Ali

Read only

Former Member
0 Likes
8,706

hi,

Insert values in ls_httpnvp not lt_httpnvp as ls_httpnvp is acting as your work area and lt_httpnvp as internal table. So first put values in work area and then append them into internal table.

Thanx.

Read only

Former Member
0 Likes
8,706

Hi ,

Use Your code in following way.



  DATA: lt_httpnvp TYPE STANDARD TABLE OF TIHTTPNVP,
      ls_httpnvp LIKE LINE OF LT_HTTPNVP.

ls_httpnvp-name = 'WF_USERID'.
ls_httpnvp-value = 'yy029672'.

append ls_httpnvp to lt_httpnvp.

I hope it works.

Regards,

Rohit

Edited by: Rohit M on Mar 25, 2009 2:04 PM

Read only

0 Likes
8,706

Hi Rohit,

I did as u suggested but not solved.

Same error message!!

BR,

Ali

Read only

0 Likes
8,706

Ali,

Use this code:


DATA: lt_httpnvp TYPE TABLE OF IHTTPNVP,
      ls_httpnvp type line of TIHTTPNVP.

ls_httpnvp-name = 'WF_USERID'.
ls_httpnvp-value = 'yy029672'.


append ls_httpnvp to lt_httpnvp.

Regards

Arjun

Read only

0 Likes
8,706

hi

Try to declare first line like this

lt_httpnvp TYPE TABLE OF tihttpnvp,

Read only

former_member402443
Contributor
0 Likes
8,707

Hi Ali,

Modify the code to :

TIHTTPNVP is a table type so you have to declare it as mention below.

DATA: lt_httpnvp TYPE TIHTTPNVP,

ls_httpnvp LIKE LINE OF lt_httpnvp.

ls_httpnvp-name = 'WF_USERID'.

ls_httpnvp-value = 'yy029672'.

append ls_httpnvp-value to lt_httpnvp.

Regard

Manoj Kumar

Read only

Former Member
0 Likes
8,706

Thanks all,

I appreciate you help and undersading.

Read only

Former Member
0 Likes
8,706

Hi,

Use 'standard table of' instead of using 'table of'

example;

DATA: lt_httpnvp TYPE STANDARD TABLE OF TIHTTPNVP,

ls_httpnvp type TIHTTPNVP.

Regards

Rama Krishna G