cancel
Showing results for 
Search instead for 
Did you mean: 

mass Functional Location creation problem by using SALV

Former Member
0 Kudos

hi, i'm a newer to sap.

currently, i'm doing a functional location creation lab in webdynpro using editable ALV.

in the creation process, the BAPI_FUNCLOC_CREATE service is employed, and new functional locations, just for example - ABC,  can be successfully created.

the problem is that, when i use BAPI_FUNCLOC_GETLIST to search the newly created functional location, say ABC. In the result, ABC is not in the list.

that means it is failed to get ABC.

so that I used BAPI_FUNCLOC_GETDTL to get the detail of ABC. however, it returned an 'cannot be read' error - "functional location ABC cannot be read".

after that, i've tried to found it by using TCODE IL03. it's ok!

then I first created a new functional location, say DEF, by using TCODE IL01, and then i tried to find it through the webdynpro application which used BAPI_FUNCLOC_GETDTL, it also failed.

it seems that something wrong or miss within the creation process/read process, maybe any 'MUST' attributes missed? or something need to be done by using functional location module using SALV in webdynpro?

Accepted Solutions (0)

Answers (1)

Answers (1)

iftah_peretz
Active Contributor
0 Kudos

Hi aser,

Insert after your BAPI_FUNCLOC_CREATE command the next command:

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

then the rest will follow.

Let me know if this did the job for you,

Best,

Iftah

Former Member
0 Kudos

thanks, Iftah,

i think it's not because of that.

there's one case - after a new functional location was created in IL01. It still could not be read in the webdynpro application whatever using bapi_funcloca_getlist or bapi_funcloc_getdtl. the error is 'functional location xxxx cannot be read'. anyway, thanks for your suggestion =]

aser

iftah_peretz
Active Contributor
0 Kudos

hi,

have you tried my answer?

the error you are getting is maybe because there is no func loc to be read.

Plus if you are using an RFC to do these changes you need to understand that there is a difference between the SAP env. and the webdynpro one as far as work committing comes to play.

Try it (what do you have to lose?)and then come back with the error message number and we'll figure it out.

Best,

Iftah

Former Member
0 Kudos

hi, Iftah

ye, I tried it yesterday.

after calling bapi_funcloca_create, called bapi_funcloca_commit function with 'commit and wait', and after several hours, searched the new created FL by calling bapi_funcloca_getdtl.

um~~~~ as I cannot access to sap system now till the day after tomorrow, i'll try it in detail age. =]

thanks,

aser

------------------------------

it has been solved. that's because incorrect data(parameter) conversion of between type funcloca and funcloca_int.