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: 

can i make the filed as option in BDC

Former Member
0 Kudos

Hi Experts,

I have written an BDC data upload program for Tcode AS91. i have used 15 fileds in recording. now if the user upload the text files which contain 15 fileds , then evrthing working fine,

but in the latest verion of Tcode AS91, one filed( Tax jurisdiction code) is removed,

now my question can i make the filed (Tax jurisdiction code) as option in my program, because in few cases the user not uploading the data for filed (Tax jurisdiction code).

Regards

niru

7 REPLIES 7

Former Member
0 Kudos

Hi,

Maintain an extra tab space in your flat file for Tax jurisdication code, so that the program will not give you any dump or error. or you have to modify the code as per the flat file.

Regards,

Satish

0 Kudos

Hi satish

Thanks for your reply,

in Tcode AS 91 the screen fileds will change based on the company code,

ex: 1. company code 001 the filed taxt jurisidiction is exits then it works fine

2. company code 002 the filed taxt jurisidiction does not exit then getting error message

i have maintained space in the txt file for the filed in first case wrking fine

in second casze iam getting an error message that

"Cursor field ANLZ-TXJCD. does not exist in the screen.

so how can incorporate the logic to set the option functionality

thanks in adance

regards

nieru

0 Kudos

You have to live with the transaction as it is. If it needs the field then, there's not much you can do about it.

However, if you are using the session method, then an error session will be created with all of the errors. Usually the person who supplies the file is responsible for processing and fixing the error session.

Rob

0 Kudos

Hi Bob,

thanks for your reply..yes iam able to see the errors in session.

my question is can i modify the program like , make the filed Tax jurisdiction as option , if the upload file does not conatin filed then i should dont upload , if it exists in upload file i need to update it.

is it possible to write the logic according to the requirement?

code:

PERFORM bdc_field USING 'BDC_CURSOR'

'ANLZ-TXJCD'.

PERFORM bdc_field USING 'ANLZ-KOSTL'

wa_rec-kostl_007.

PERFORM bdc_field USING 'ANLZ-WERKS'

wa_rec-werks_008.

PERFORM bdc_field USING 'ANLZ-CAUFN'

wa_rec-caufn.

PERFORM bdc_field USING 'ANLZ-TXJCD'

thanks in advance.

regards

niru

0 Kudos

do you mean:

PERFORM bdc_field USING 'BDC_CURSOR' 'ANLZ-TXJCD'.
PERFORM bdc_field USING 'ANLZ-KOSTL' wa_rec-kostl_007.
PERFORM bdc_field USING 'ANLZ-WERKS' wa_rec-werks_008.
PERFORM bdc_field USING 'ANLZ-CAUFN' wa_rec-caufn.
IF NOT wa_rec-txjcd IS INITIAL.
  PERFORM bdc_field USING 'ANLZ-TXJCD' wa_rec-txjcd.
ENDIF.

Rob

Message was edited by:

Rob Burbank

0 Kudos

yes...similar logic.... before uploading just cheking the filed (Tax jurisidction )value is there or not?

please tell me is it make sense?

reagrds

niru

0 Kudos

There was an error in the code I posted earlier. I've corrected it. But I wouldn't do it that way. I would:

PERFORM bdc_field USING 'BDC_CURSOR' 'ANLZ-TXJCD'.
PERFORM bdc_field USING 'ANLZ-KOSTL' wa_rec-kostl_007.
PERFORM bdc_field USING 'ANLZ-WERKS' wa_rec-werks_008.
PERFORM bdc_field USING 'ANLZ-CAUFN' wa_rec-caufn.
PERFORM bdc_field USING 'ANLZ-TXJCD' wa_rec-txjcd.

If the code is entered, it picks it up; if not, it tries to fill it with a blank. If you use the code where it doesn't try to fill it at all if it's not in the file, it may use the last value that was entered.

Rob