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

ztable to convert zfunction module

Former Member
0 Likes
830

Hi Friends -

two qns

1) i have one Ztable with 354 fields , using those all i need to develop one FM with all 354 fields .

is there any way we can convert or copy in fast way to FM these fields ?

2) Is there any maximum limit for No of Fields in FM ?

Regards

Meeta

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
787

Thanks for ur help,

But one problem if i declare import parametere zbasic like structure , then am not able to update that ztable

i have defined like this in my code , to convert in internal table but when i run the FM the record will create with 0000 values in ztable zhr_ibasic why so ?

data zba type standard table of ZHR_IBASIC with header line.

zba[] = zbasic[].

MODIFY ZHR_IBASIC FROM zba.

not sure what is wrong ?

Regards

Meeta

5 REPLIES 5
Read only

Former Member
0 Likes
787

Hi,

Check with this function module.

CATT_GET_TABLE_ENTRIES.

Regards,

Shamma

Read only

Former Member
0 Likes
787

Hi Meeta,

Do you need to specify all 354 fields individually? Could you not just define your import parameters as a structure, with the same definition as your table?

Regards,

Nick

Read only

Former Member
0 Likes
788

Thanks for ur help,

But one problem if i declare import parametere zbasic like structure , then am not able to update that ztable

i have defined like this in my code , to convert in internal table but when i run the FM the record will create with 0000 values in ztable zhr_ibasic why so ?

data zba type standard table of ZHR_IBASIC with header line.

zba[] = zbasic[].

MODIFY ZHR_IBASIC FROM zba.

not sure what is wrong ?

Regards

Meeta

Read only

0 Likes
787

Hi,

if you declare the Zbasic as import parameter that means you can pass the input to the Function module through that structure.

declare as below in import parameters.

ZBASIC like ZHR_IBASIC .

then you can modify your table from this import parameter itself.

MODIFY ZHR_IBASIC FROM ZBASIC.

Modify statement modify the record, if there is any record exist in the table with the same key that you pass as input.

other wise creates new record.

Vijay

Read only

Former Member
0 Likes
787

Hi Meeta Nair,

Does your Ztable Contain MANDT (Client) Field..

If yes then in your FM source Code you have to assign the value for MANDT

ZTABLE-MANDT = SY-MANDT.

and also Try to pass primary key values in where condition for MODIFY statement...

OR Maket primary key fields as mandatory in FM...

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

ilesh Nandaniya