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: 

Problem in bdc f-22

Former Member
0 Kudos
86

hi, friends

iam doingbdc for f-22 my problem is when i run it with one account number which has -tax on sales puchase code-

mwskz. it performs that mwskz field but when second record in same file excute which has not tzx code .. i find the error which says ' field doesnot exits mwskz on screen 300'.

is there any table-field name that checks the the acount taxable or not .. i serached it in ska1 but couldnt found.. need help .plss

regards.

farukh

PERFORM bdc_dynpro USING 'SAPMF05A' '0300'.

PERFORM bdc_field USING 'BDC_CURSOR'

'BSEG-SGTXT'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=ZK'.

PERFORM bdc_field USING 'BSEG-WRBTR'

i_final-wrbtr2.

PERFORM bdc_field USING 'BSEG-MWSKZ'

i_final-mwskz2.

*

  • PERFORM bdc_field USING 'BSEG-BUPLA'

  • i_final-bupla2.

*

PERFORM bdc_field USING 'BSEG-SGTXT'

i_final-sgtxt2.

PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.

PERFORM bdc_field USING 'BDC_CURSOR'

'COBL-GSBER'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=ENTE'.

PERFORM bdc_field USING 'COBL-GSBER'

i_final-gsber.

2 REPLIES 2

andreas_mann3
Active Contributor
0 Kudos
48

yes,

select table skb1 field MWSKZ with your account

e,g,:

 SELECT SINGLE * FROM  skb1
         WHERE  bukrs  = itab-bukrs
         AND    saknr  = itab-account.
  CASE skb1-mwskz.
*no tax
    WHEN space OR '<' OR '>'.
*all taxes
    when  '*'.
*input tax
    WHEN '-'.
*ouputtax
    WHEN '+'.
*take:normal mwskz
    WHEN OTHERS.
  ENDCASE.

Message was edited by: Andreas Mann

vinod_gunaware2
Active Contributor
0 Kudos
48

Hi

Upload the file into internal table say itab.

Then sort according to field account number.

Then Built logic in such a way that, Check whether account number is repeated or not. If it is repeated then skip

PERFORM bdc_field USING 'BSEG-MWSKZ'

above statement and it value assignment also.

I think it should solve ur problem.

Regards

vinod