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: 

problem with passing a value to an input field

former_member586174
Participant
0 Kudos

Hi Experts,
I have a problem with passing a value to a input field, as it is still initial ?
my coding look like below ,

         TYPES: BEGIN OF ts_output.
         INCLUDE STRUCTURE marc.
         TYPES  count  TYPE i. "hier the field wich will have the count
         TYPES  END OF ts_output.
         Data lv_count type I.
        wa_marc   TYPE  ts_output,
        it_marc TYPE STANDARD TABLE OF  ts_output, 

select * from marc into it_marc 

DESCRIBE TABLE it_marc  LINES lv_count.
clear wa_marc
wa_marc-count = lv_count

" wa_marc-count is the output field which i have created with type INT4

Best Regrads

Jenie

10 REPLIES 10

omer_sakar
Participant
0 Kudos

Hi ,

Do you mean that? : (LV_COUNT displays how many records)

select * from MARC into table IT_MARC .

describe table IT_MARC lines LV_COUNT.
clear WA_MARC.
WA_MARC-COUNT = LV_COUNT.

matt
Active Contributor
0 Kudos

Since the code she's posted isn't syntactically correct, she could have meant anything.

0 Kudos

Hi Omar,
yes this is exactly what I mean...

Best Regards

matt
Active Contributor

Lucky guess then Omer!

Of course, you can do it in fewer lines.

select * from MARC into table IT_MARC.
clear WA_MARC.
WA_MARC-COUNT = lines( IT_MARC ).

0 Kudos

Hi Matthew,

how can put your answer as accepted as it is the correct one and I can just put 'like'....

Best Regards

matt
Active Contributor

Why haven't you posted your actual code. Although I'll give you a little credit for actually using the "code" button...

Since the code you've published isn't syntactically correct, how can anyone help you? Any advice we could give will be guessing what your actual code is.

Muthuraja
Active Participant
0 Kudos

Hi Jeniffer,

I have rearranged your code below, Kindly try this.

types: begin of ts_output,
         ls_marc type marc,
         count   type i, "hier the field wich will have the count
       end of ts_output.

data lv_count type i.
data wa_marc   type  ts_output.
data it_marc type standard table of  ts_output.

select * from marc up to 10 rows into table it_marc.

describe table it_marc  lines lv_count.

clear wa_marc.
wa_marc-count = lv_count.

former_member586174
Participant
0 Kudos

Hi Matthew,

thank you for your comment , I have tried to make the question easiest possible to figure out the concept..

Best Regards

Jenie

matt
Active Contributor
0 Kudos

But one absolutely necessary thing you must do is ensure that any code you paste is syntactically correct. Unfortunately, it's still not clear what your issue is.

former_member586174
Participant
0 Kudos

many thanks matthew,

this is working

WA_MARC-COUNT = lines( IT_MARC ).

Best Regards

Jenie