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

how to set optional for table structure in functiona module

Former Member
0 Likes
1,528

hi experts,

as i have small doubt regarding

while publishing web service by using rfc where i am unable to set optional for table structure i am able to put optional for import parameters may i know how to set optional for table structure ....

reagrds prabhanjan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,198

table parameters are kind of obsolete, and ther is no need to use them.

If you declare the type of an import parameter correctly (with a tabletype existing in your dictionary) you can import a table in your import parameters. rest should be easy then.

Edited by: Florian Kemmer on May 26, 2011 3:37 PM

just for the record, this works with exporting parameters as well.

8 REPLIES 8
Read only

Former Member
0 Likes
1,199

table parameters are kind of obsolete, and ther is no need to use them.

If you declare the type of an import parameter correctly (with a tabletype existing in your dictionary) you can import a table in your import parameters. rest should be easy then.

Edited by: Florian Kemmer on May 26, 2011 3:37 PM

just for the record, this works with exporting parameters as well.

Read only

0 Likes
1,198

table parameters are kind of obsolete, and there is no need to use them.

Except in remote-enabled FM's as long as basXML is not the RFC protocol. In this case, tables parameters are preferred, as they are much faster than changing parameters in this case. See Official ABAP Programming Guidelines by SAP Press (2010), pages 342-344.

Read only

0 Likes
1,198

Ignoring the TABLES/CHANGING/EXPORTING argument...

while publishing web service by using rfc where i am unable to set optional for table structure i am able to put optional for import parameters may i know how to set optional for table structure

Why not? There's no issue with marking a TABLES interface parameter with 'Optional' and publishing the function module or function group as a web service...

Read only

0 Likes
1,198

hi experts,

i am able to put optional for strucutre but i need to put optional for the individual fields present in that structure ...

in present sceniro either i am having to pass values for all the fields of the structure or skip the whole structure ..

but my requirmnt is that few of the fields are not mandatory in that structure so they should be acpet null values.

regards,

prabhanjan

Read only

0 Likes
1,198

Hi,

I think these validation are done using the coding only. Please check the source code inside the rfc for the particular field. and change the code accordingly.

Regards,

Dhina..

Read only

0 Likes
1,198

You can not put some of fields in structure is optinal or mandatory. You have to put validation in you program for that.

Only you can define structure parameter is optional or mandatory.

Kind Rgds

Ravi Lanjewar

Read only

0 Likes
1,198

hi experts,

as i have small problem when i have executed a bapi creation and i have saved that transaction

and in my criteria we have to check for recurssive and unfortunatly i need to delete all the fields of a record which was saved

and what function or bapi do i need to use there...

for commiting bapi_trnsaction_commit i have used

and for deleteing what should i use..

regards

prabhanjan

Read only

0 Likes
1,198

Hi ,

use 'BAPI_TRANSACTION_ROLLBACK'

Regards,

Dhina..