Application Development and Automation 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: 
Read only

BDC question

Former Member
0 Likes
986

Hi ,

I have to pass a range to select-option-low value in a BDC recording. How can this be done.I want to pass the value in one shot.Please let me know if this can be achieved?

Regards,

Ankur Bhandari.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
954

Hi,

Goto Sm35 and do the recording for the transaction for which you need to pass the range.

You need to basically pass the serial no. along with the field name( which you would get from recording ). The serial no. would be passed in bracket to indicate the different values which you are going to pass.

for eg.

perform bdc_field tables i_bdcdata

USING 'BUKRS_SLOW_I(01)'

'2345'.

perform bdc_field tables i_bdcdata

USING 'BUKRS_SLOW_I(02)'

'567'.

perform bdc_field tables i_bdcdata

USING 'BUKRS_SLOW_I(03)'

'7890'.

******************************************

FORM bdc_field TABLES i_bdcdata1 STRUCTURE bdcdata

USING fnam

fval.

*----


  • BDC Data for Invoice

*----


TYPES: BEGIN OF t_bdc_data.

INCLUDE STRUCTURE bdcdata. "Batch input: field structure

TYPES: END OF t_bdc_data.

DATA : wa_bdcdata TYPE t_bdc_data. " BDC Data

CLEAR wa_bdcdata.

wa_bdcdata-fnam = fnam.

wa_bdcdata-fval = fval.

APPEND wa_bdcdata TO i_bdcdata1.

ENDFORM. " bdc_field

Hope this would solve the probelm.

Best regards,

Prashant

7 REPLIES 7
Read only

Former Member
0 Likes
954

Hi Ankur,

I have assumed that 'range' means multiple values. Follow these steps,

1. Create a database table with field as select-option low field type.

2. Update the database with a flat file which contains the select-option values.

3. In the same BDC Program declare a select option load all the data from the database table to you select option low field.

Hope this helps you.

Regards,

Maheswaran.B

Read only

0 Likes
954

I think i wasnt clear enough.I already have done the recording for a transaction which has a select option in the selection screen.

________________________________________________________

RPAR4W00 1000 X BDC_CURSOR TESTRUN

BDC_OKCODE =VBAC

PAY_TYPE PP

SL_RUNID-LOW 143948

ACOMMENT Test run for archiving 12/22/2005

TESTRUN -


Now I want to replace 143948 by a range of values.

Read only

Former Member
0 Likes
955

Hi,

Goto Sm35 and do the recording for the transaction for which you need to pass the range.

You need to basically pass the serial no. along with the field name( which you would get from recording ). The serial no. would be passed in bracket to indicate the different values which you are going to pass.

for eg.

perform bdc_field tables i_bdcdata

USING 'BUKRS_SLOW_I(01)'

'2345'.

perform bdc_field tables i_bdcdata

USING 'BUKRS_SLOW_I(02)'

'567'.

perform bdc_field tables i_bdcdata

USING 'BUKRS_SLOW_I(03)'

'7890'.

******************************************

FORM bdc_field TABLES i_bdcdata1 STRUCTURE bdcdata

USING fnam

fval.

*----


  • BDC Data for Invoice

*----


TYPES: BEGIN OF t_bdc_data.

INCLUDE STRUCTURE bdcdata. "Batch input: field structure

TYPES: END OF t_bdc_data.

DATA : wa_bdcdata TYPE t_bdc_data. " BDC Data

CLEAR wa_bdcdata.

wa_bdcdata-fnam = fnam.

wa_bdcdata-fval = fval.

APPEND wa_bdcdata TO i_bdcdata1.

ENDFORM. " bdc_field

Hope this would solve the probelm.

Best regards,

Prashant

Read only

0 Likes
954

Does this work with hardcoding 'BUKRS_SLOW_I(01), 02 ,03 or with variables as well. Cos I am unable to do the same. Any idea why ?

Read only

Former Member
0 Likes
954

Hi Ankur,

I assume that you need a range in the select-option low field. i.e i mean multiple values for select-option low in your code.

You have specified the select option low field in the same way as you know that there is a select-option high field specify the range's high limit.

You have done with 1 range.

If you need multiple ranges then you can append the range values.

so_var-low = 'xxx'.

so_var-high = 'xxx'.

append so_var.

Hope this helps you.

Regards,

Maheswaran.B

Read only

Former Member
0 Likes
954

Hi Ankur,

1 your requirement is not clear.

2.

I have to pass a range to select-option-low value in a BDC recording

Does the transaction for bdc

have a screen where select-options facility is there?

Or

U want to loop thru the range / select-option

and perform bdc.

regards,

amit m.

Read only

Former Member
0 Likes
954

Hi Ankur,

You need to get the field name through recording. Please do recording for your transaction through SM35 & get the field name for which you need to pass the range.

Regarding, variable query, yes you can pass a value to a variable & assign the variable as field name in BDC.

Hope this solves your query.

Best regards,

Prashant