Application Development 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: 

HI all, need some guide here pls

Former Member
0 Kudos

HI,

i need some guide for FB60, i have create a BDC using FB60.

inside this BDC i have a code which is to set company code to whatever i want, with a validation

DATA:CCODE(5).
GET PARAMETER ID 'BUK' FIELD CCODE.

IF CCODE = INVFO-BUKRS.
ELSE.
subrc = 0.

perform bdc_nodata      using NODATA.

perform open_group      using GROUP USER KEEP HOLDDATE CTU.

perform bdc_dynpro      using 'SAPMF05A' '1100'.
perform bdc_field       using 'BDC_OKCODE'
                              '/ECCDE'.
perform bdc_dynpro      using 'SAPLACHD' '1000'.
perform bdc_field       using 'BDC_CURSOR'
                              'BKPF-BUKRS'.

perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_field       using 'BKPF-BUKRS'
                              INVFO-BUKRS.
perform bdc_transaction tables messtab
using                         'FB60'
                              CTU
                              MODE
                              UPDATE.
if sy-subrc <> 0.
  subrc = sy-subrc.
  exit.
endif.
perform close_group using     CTU.
ENDIF.

This is running fine when i testing it, BUT the problem come which is during the web service part.

i have create a WS using this BDC, however the WS give me an error INTERNAL SERVER ERROR.

I think the problem is that when i run WS it dont know what is BUK and CCODE.

So the validation part fail

in FB60 if i use e.g 1000 as company code(mean FB60 is using 1000 as company code), if i try to set it to 1000 again, the BDC willl give me error. That is why i need to have a validation for it.

i have also try

SET PARAMETER ID 'BUK' FIELD INVFO-BUKRS.

This line of code also unable to run, Just because the WS dont know what the BUK is.

Anyone has any guides for me to solve this error?

Points will be awared.

Thanks

Guanwei

2 REPLIES 2

Former Member
0 Kudos

hI

0 Kudos

Hi

any solution given??

thanks

guanwei

points will be awarded if the solution help