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

Hide selection screen in BDC

Former Member
0 Likes
1,782

Hi Experts,

i created a bdc for VA01 transaction. i use include bdcrecx1 in my code every time i run the prog it shows a selection screen to select generate session or call transaction methode, but i want to hide that screen for user by automatically selecting call transaction radio button with processing mode 'N' and update mode 'A'

can anyone explain with sample code...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,154

Hi,

REPORT ztest_bdc_pa40

NO STANDARD PAGE HEADING LINE-SIZE 255.

----


  • data definition

----


  • Batchinputdata of single transaction

DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.

  • messages of call transaction

DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.

  • error session opened (' ' or 'X')

DATA: e_group_opened.

  • message texts

TABLES: t100.

START-OF-SELECTION.

PERFORM bdc_dynpro USING 'SAPMP50A' '2000'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RP50G-WERKS(01)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'/00'.

PERFORM bdc_field USING 'RP50G-PERNR'

'9000096'.

PERFORM bdc_field USING 'RP50G-EINDA'

'06.05.2006'.

PERFORM bdc_dynpro USING 'SAPMP50A' '2000'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RP50G-PERNR'.

CALL TRANSACTION 'PA40' USING bdcdata[] MODE 'E'.

----


  • Start new screen *

----


FORM bdc_dynpro USING program dynpro.

CLEAR bdcdata.

bdcdata-program = program.

bdcdata-dynpro = dynpro.

bdcdata-dynbegin = 'X'.

APPEND bdcdata.

ENDFORM. "bdc_dynpro

----


  • Insert field *

----


FORM bdc_field USING fnam fval.

CLEAR bdcdata.

bdcdata-fnam = fnam.

bdcdata-fval = fval.

APPEND bdcdata.

ENDFORM. "bdc_field

Try this sample code.

Thanks,

Durai.V

5 REPLIES 5
Read only

Former Member
0 Likes
1,154

Hi ,

in that case , copy all required FORM-ENDFORM statements from that include program and remove it from ur BDC program , in that case u wont get the screen.

Regards

Prabhu

Read only

Former Member
0 Likes
1,155

Hi,

REPORT ztest_bdc_pa40

NO STANDARD PAGE HEADING LINE-SIZE 255.

----


  • data definition

----


  • Batchinputdata of single transaction

DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.

  • messages of call transaction

DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.

  • error session opened (' ' or 'X')

DATA: e_group_opened.

  • message texts

TABLES: t100.

START-OF-SELECTION.

PERFORM bdc_dynpro USING 'SAPMP50A' '2000'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RP50G-WERKS(01)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'/00'.

PERFORM bdc_field USING 'RP50G-PERNR'

'9000096'.

PERFORM bdc_field USING 'RP50G-EINDA'

'06.05.2006'.

PERFORM bdc_dynpro USING 'SAPMP50A' '2000'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RP50G-PERNR'.

CALL TRANSACTION 'PA40' USING bdcdata[] MODE 'E'.

----


  • Start new screen *

----


FORM bdc_dynpro USING program dynpro.

CLEAR bdcdata.

bdcdata-program = program.

bdcdata-dynpro = dynpro.

bdcdata-dynbegin = 'X'.

APPEND bdcdata.

ENDFORM. "bdc_dynpro

----


  • Insert field *

----


FORM bdc_field USING fnam fval.

CLEAR bdcdata.

bdcdata-fnam = fnam.

bdcdata-fval = fval.

APPEND bdcdata.

ENDFORM. "bdc_field

Try this sample code.

Thanks,

Durai.V

Read only

0 Likes
1,154

HI

thanks... i got the answer...

but while uploading more than 1 sales order it doesnt work properly... for example if i try to upload 3 sales order with diff datas it creates 3 sale orders with same data as like first sale order....

i use

CALL TRANSACTION 'VA01' USING bdcdata MODE 'E' UPDATE 'A'.

with in loop of internal table.

while debugging the itab value changes correctly but it doesnt upload.

Read only

0 Likes
1,154

Hi,

Loop at itab1.

loop at itab2 where sddate = itab1-sddate.

perform ....

perform....

endloop.

CALL TRANSACTION 'VA01' USING bdcdata MODE 'E' UPDATE 'A'.

clear bdcdata[].

endloop.

Here itab1 header details-->

itab2 item details

Thanks,

Durai.V

Read only

0 Likes
1,154

thankyou very much...

problem solved...