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

Condition Type and Condition Table

Former Member
0 Likes
1,811

Hi All,

Can I have a standard report for condition type and condition table such that based on the selection of condition type and condition table on selection screen the output fields of the report should change dynamically.Thanks in advance.

Regards,

Chakradhar.

10 REPLIES 10
Read only

arthur_alvesteixeira
Active Participant
0 Likes
1,763

Reddy,

to get the condition values you need a document.

More detailes you have in KONV table (Conditions (Transaction Data)).

Read only

0 Likes
1,763

... example of documents: Sales order and Purchase order.

The 'Number of the document condition' of these documents are available in:

  • Saler Order - VBAK-KNUMV
  • Purchase Order - EKKO-KNUMV
Read only

0 Likes
1,763

Hi Arthur,

Thanks for your reply.Actually based on the condition type and condition table provided on selection screen I am downloading the short descriptions of the header and item fields into flat file which I am fetching from table t681e and their short descriptions from dd04t table.Now in flat file the user enters the values under the respective fields and I am uploading the data into internal table of string type.Then these internal table is splitted  into two dynamic internal tables which I created based on header and item fields.Now i want two move these header and item dynamic internal tables data into another dynamic internal table named final.But the problem I am facing  while combing the header and item dynamic internal tables into another final dynamic internal table is with below code :

LOOP AT <fs_item> INTO <fs_item_line>.

       LOOP AT <fs_header> INTO <fs_header_line> WHERE key = <fs_item_line-key>.

         ASSIGN COMPONENT sy-tabix OF STRUCTURE <fs_final_line> TO <fs_final_line1>.
         MOVE-CORRESPONDING <fs_header_line> TO <fs_final_line1>.
         MOVE-CORRESPONDING <fs_item_line>   TO <fs_final_line1>.
*             CLEAR <fs_header_line>.
         INSERT <fs_final_line1> INTO TABLE <fs_final>.
       ENDLOOP.
  ENDLOOP.


I am getting error on second line of above code on usage of where condition for the header loop.


Error is as follows:


But there is a field with name key in my dynamic header structure.Can anyone suggest me how to solve it.Thanks in advance.


Regards,

Chakradhar.




Read only

0 Likes
1,763

About the syntax, <fs_item_line-key> change to <fs_item_line>-key

Read only

0 Likes
1,763

Hi,

Thanks for your reply. I  tried it before only  but the problem remains same with no change in error.

Regards,

chakradhar.

Read only

0 Likes
1,763

Since you looped item, so you can 'READ' header.

LOOP AT <fs_item> INTO <fs_item_line>.

      READ TABLE <fs_header> INTO <fs_header_line> with key = <fs_item_line-key>.


regards,

Archer

Read only

0 Likes
1,763

Hi Dengyong,

Thanks for your reply.First I tried with the read statement, but the error while using read statement is shown below:

Need a suggestion how to solve the above issue.Thanks in advance.

Regards,

Chakradhar.

Read only

0 Likes
1,763

LOOP AT <fs_item> INTO <fs_item_line>.

       Assign component 'KEY' of structure <fs_item_line> to <comp>.

      READ TABLE <fs_header> ASSIGNING <fs_header_line> with key = <comp>.



Read only

0 Likes
1,763

Hi dengyong,

Thanks for your reply.With the above code which you specified in reply to me is showing the following error.

Regards,

Chakradhar.

Read only

Former Member
0 Likes
1,763

Hi Chakri

Just dynamically create internal table, then take it as output. Please search detail in SCN.

regards,

Archer