Skip to Content
0
Former Member
Apr 21, 2008 at 10:00 AM

HI all, need some guide here pls

18 Views

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