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: 

error in BDC

Former Member
0 Kudos

hi,

im doing a BDC on tcode VA01

and im inputting PO number for each item,that data is found on the tab page Purchase order data and its name is VBKD-BSTKD, screen number is 4003

but when im execting the BDC, an error is being displayed saying that the field VBKD-BSTKD does not exist on screen SAPMV45A 4003, but when i used SHDB to record the transaction, this field was on that screen itself

does anybody know y this error occurs?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

that field is in subscreen not in screen.

I feel you should do transaction recording again without any error. iva SHDB,

then in same window in application toolbar ... click 'New Program'. This will put u r BDC logic in new report.

Copy paste that logic in your code and make appropriate changes.

*Hope this may help you.

10 REPLIES 10

Former Member
0 Kudos

Hi,

that field is in subscreen not in screen.

I feel you should do transaction recording again without any error. iva SHDB,

then in same window in application toolbar ... click 'New Program'. This will put u r BDC logic in new report.

Copy paste that logic in your code and make appropriate changes.

*Hope this may help you.

0 Kudos

this is wat i did, heres my code:

LOOP AT order_info.

tabix = sy-tabix.

select single bstkd

from vbkd

into bstkd

where vbeln = order_info-vgbel

and posnr = '000000'.

if sy-subrc ne 0.

endif.

  • AT NEW vgbel.

  • Set the right sreen number

if order_info-vgbel = first_vgbel.

first_screen = '4001'.

**pct

  • First screen

PERFORM loadibatch USING : 'X' 'SAPMV45A' '0101',

' ' 'VBAK-AUART' auart,

  • DPZ01

  • ' ' 'VBAK-VKORG' '1',

  • ' ' 'VBAK-VTWEG' '1',

  • ' ' 'VBAK-SPART' '1',

' ' 'VBAK-VKORG' vkorg,

' ' 'VBAK-VTWEG' vtweg,

' ' 'VBAK-SPART' spart,

  • DPZ01

' ' 'BDC_OKCODE' 'RAUF'.

CONCATENATE 'Refused : ' order_info-vgbel INTO comment.

  • Popup window

PERFORM loadibatch USING : 'X' 'SAPLV45C' '0100',

' ' 'LV45C-VBELN' order_info-vgbel,

' ' 'BDC_OKCODE' 'UEBR', "Copy btn

  • Second screen

  • 'X' 'SAPMV45A' first_screen,

'X' 'SAPMV45A' '4001',

' ' 'BDC_OKCODE' '=COPY'. "Copy btn

IF NOT ( auart = 'KA' OR auart = 'ZFR' OR auart = 'ZKA' ).

PERFORM loadibatch USING : ' ' 'VBAK-AUGRU' reason.

ENDIF.

  • fill in KUWEV-KUNNR with NPE

PERFORM loadibatch USING : ' ' 'KUWEV-KUNNR' 'NPE'.

*input purchase order number

PERFORM loadibatch USING :

' ' 'BDC_OKCODE' '=ITEM',

' ' 'BDC_SUBSCR'

'SAPMV45A 4021SUBSCREEN_HEADER',

' ' 'BDC_SUBSCR'

'SAPMV45A 4701PART-SUB',

' ' 'BDC_SUBSCR'

'SAPMV45A 4400SUBSCREEN_BODY',

' ' 'BDC_SUBSCR'

'SAPMV45A 4440HEADER_FRAME',

' ' 'BDC_SUBSCR'

'SAPMV45A 8310HEAD_USER',

' ' 'BDC_SUBSCR'

'SAPLV45W 0400SUBSCREEN_VERTRAG',

' ' 'BDC_SUBSCR'

'SAPMV45A 4900SUBSCREEN_TC',

' ' 'RV45A-VBAP_SELKZ(01)' 'X',

' ' 'BDC_SUBSCR'

'SAPMV45A 4050SUBSCREEN_BUTTONS',

'X' 'SAPMV45A' '4003',

' ' 'BDC_OKCODE' '=T\10',

' ' 'BDC_SUBSCR'

'SAPMV45A 4013SUBSCREEN_HEADER',

' ' 'BDC_SUBSCR'

'SAPMV45A 4451SUBSCREEN_BODY',

' ' 'BDC_OKCODE' '/EBACK',

' ' 'BDC_SUBSCR'

'SAPMV45A 4013SUBSCREEN_HEADER',

' ' 'BDC_SUBSCR'

'SAPMV45A 4454SUBSCREEN_BODY',

' ' 'VBKD-BSTKD' bstkd.

if order_info-vgbel <> first_vgbel.

PERFORM loadibatch USING :

'X' 'SAPMV45A' '4001',

' ' 'BDC_OKCODE' '=COPY',

'X' 'SAPLV45C' '0100',

' ' 'LV45C-VBELN' order_info-vgbel,

' ' 'BDC_OKCODE' 'UEBR'.

PERFORM loadibatch USING : 'X' 'SAPMV45A' '4001',

' ' 'BDC_OKCODE' '/00',

' ' 'BDC_OKCODE' '=ITEM',

' ' 'RV45A-VBAP_SELKZ(02)' 'X',

'X' 'SAPMV45A' '4003',

' ' 'BDC_OKCODE' '/EBACK',

' ' 'VBKD-BSTKD' bstkd.

endif.

if tabix = n.

PERFORM loadibatch USING :

'X' 'SAPMV45A' '4001',

  • ' ' 'BDC_OKCODE' 'POPO',

' ' 'BDC_OKCODE' '=SICH'.

CALL TRANSACTION 'VA01' USING ibatch

MESSAGES INTO messtab MODE 'A' UPDATE 'S'.

Former Member
0 Kudos

Hi sia anjali ,

PO number will be on screen 4001 not 4003.

check this

perform bdc_dynpro using 'SAPMV45A' '4001'.

perform bdc_field using 'BDC_OKCODE'

'=HEAD'.

perform bdc_field using 'VBKD-BSTKD'

'10'. " Po number value

Here u can give the internal table field name for the Po number instead of '10' which i have given.

0 Kudos

the po number you are referring to is found at the header level,im referring to the po number realting to the item level

0 Kudos

Hi

Seems to be Ok for me, have you have checked by executing in foreground the sequence. 4454 is the right subscreen number. Please see the cursor position as well.

Also please see if you can use BAPI's which are more convinient.

To Vijay,

To clarify your doubt you have to check in VBKD with item number which can be different from the header. Hope this clear your doubt.

Kind Regards

Eswar

Message was edited by: Eswar Rao Boddeti

Former Member
0 Kudos

Hi sia ,

Po number at header level will be there ..

this is given at the sold to ship to screen ..

bstkd is Po reference number -


length 35 .

there is no Po number at item level ..whats the purpose of maintaining ..

<b>a sales order is created with reference to a po and this is at header level .</b>

if u see VBAK there u will get the Po number ..

vbkd-bstkd is o reference number ..

i dont see Po number/reference number is VBAP table ..

just check once again for ur confirmation ..

regards,

VIjay

Former Member
0 Kudos

go to Purchase order data tab

check the technical information for Po number , i think it is available in screen 4002 not 4003 in the item level

Former Member
0 Kudos

Do the recording properly for all the screenfields or else the error wll come again and will not allow u to fill the screen fields

Regards

Santosh

Former Member
0 Kudos

thanks for the info ...

to eswar...

okay now in the subscreen..

for sold to

Screen field VBKD-BSTKD

Program name SAPMV45A

Screen no. 4003

for ship to

Screen field VBKD-BSTKD_E

Program name SAPMV45A

Screen no. 4003

so now this is in place say ..

so

case 1.

is the sold to and ship to are same ..

case2.

if sold to and ship to are diff ..

now if i want to do a delivery where the CUstomer Po is maintained at item level for three items say ..

three diff po 's are there ..

<b>now im wondering whats the PO number at teh header level ..</b>??? this is my main query now?

theoritically yeah i agree this is possible now the pitfall is when ever i do the calculations based on Po ref how to differentiate at header and item level .

regards,

Vijay

0 Kudos

the PO at the header level is when we are creating only one order wihtout the reference of other orders

and the PO at the item level is valid when we create one order in reference to several orders

i hope its clear