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

Function module entries against Z table entries.

tarangini_katta
Active Contributor
0 Likes
895

Hi All,

I have one internal with the following values

l_client = SY-MANDT.

i have function importin i am passing

123 800

this internal table is client independent table.

value client

123 800

345 810

567 800.

I am doing loop at itab into wa where client = l_client.

I am checking this values againse function modules paarmers.

For first loop the values are correct.

but for second the values is coming wrong and raises the exceptiiom.

thanks

How can i solve this problem.

Can aynbody please let m know.

Hi All,

I have one internal with the following values

l_client = SY-MANDT.

i have function importin i am passing

123 800

this internal table is client independent table.

value client

123 800

345 810

567 800.

I am doing loop at itab into wa where client = l_client.

I am checking this values againse function modules paarmers.

For first loop the values are correct.

but for second the values is coming wrong and raises the exceptiiom.

thanks

How can i solve this problem.

Can aynbody please let m know.

5 REPLIES 5
Read only

tarangini_katta
Active Contributor
0 Likes
815

I Tried other way around but it is working for me.please help me out

Read only

0 Likes
815

Can u please provide some more details on the query ? not able to understand the problem .

Read only

ThomasZloch
Active Contributor
0 Likes
815

Don't drink and code.

Read only

tarangini_katta
Active Contributor
0 Likes
815

Hi,

I have function module with 2 import parameters

1) value

2) client.

I am geeting the data from the ztable which contians the fields value client description.This ztable is an client independent table.so i maintained all client entries with in this table only.

like 123 800

457 810

678 800

No i want to check the value with FM parametrs values.

I am doing

loop at itab into wa where value = FMParameter-value.

IF FMParameter-value NE wa-value.

raise exception

endif.

endloop.

Now the problem is if i entered the smae value through cient 810 it sgould not accept the value.

pleas tell me how to do this

Read only

0 Likes
815

assumptions

I_VALUE

I_CLIENT Importing parameters of the FM

TB_TABLE Internal table with three fields VALUE, CLIENT, DESCR

WA_AREA is a work area

Now you can do this for the check....



  clear wa_area.
  read table tb_table into wa_area with key VALUE = I_VALUE 
                                                              CLIENT = I_CLIENT.
  if sy-subrc ne 0.
  
       raise exception. "This will be raised if there is no entry in the table with provided FM parameters
 
  endif.