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

Resolution and BDC (problem with Vf02)

Former Member
0 Likes
2,546

Hello,

recently I have a problem with a bdc regarding the changes of the resolution. In the program I am doing it has to anticipate the line item of the billing item (and the pricing as well) and select it. Problem is with the resolution, as we all know the number of entries per page varies with the resolution setting.

Right now I have searched the forums an encountered the solution where you use <b>options from</b>

so far this is my code

<b>DATA: BEGIN OF TRAN_OPTS,

DISMODE TYPE CTU_PARAMS-DISMODE VALUE 'N',

UPDMODE TYPE CTU_PARAMS-UPDMODE VALUE 'S',

DEFSIZE TYPE CTU_PARAMS-DEFSIZE VALUE 'X',

NOBINPT TYPE CTU_PARAMS-NOBINPT,

RACOMMIT TYPE CTU_PARAMS-RACOMMIT,

SHOWMENU TYPE CTU_PARAMS-SHOWMENU,

NODBUPD TYPE CTU_PARAMS-NODBUPD,

END OF TRAN_OPTS.</b>

.

.

.

.

.

<b> CALL TRANSACTION 'VF02' USING BDCDATA

MESSAGES INTO BDCMSG

OPTIONS FROM TRAN_OPTS.</b>

unfortunatley the program would run an error message<b> "MODE ...", "UPDATE ..." or "AND SKIP FIRST SCREEN" expected after "BDCMSG".</b>, which I dont get at all. Is there something that I have to do before this? Thanks and good day.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,283

Make the following changes in your code. Workin fine for me.


REPORT zztest.

DATA :  bdcdata   TYPE STANDARD TABLE OF bdcdata    WITH HEADER LINE.
DATA :  bdcmsg    TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.

DATA :  tran_optsx TYPE STANDARD TABLE OF ctu_params WITH HEADER LINE.


tran_optsx-dismode = 'N'.
tran_optsx-updmode = 'S'.
tran_optsx-defsize = 'X'.

<b>APPEND  tran_optsx.</b>


CALL TRANSACTION 'VF02' USING bdcdata
    OPTIONS  FROM tran_optsx
    MESSAGES INTO bdcmsg.



Regards,

AS

Message was edited by: Arun Sambargi

Hello,

recently I have a problem with a bdc regarding the changes of the resolution. In the program I am doing it has to anticipate the line item of the billing item (and the pricing as well) and select it. Problem is with the resolution, as we all know the number of entries per page varies with the resolution setting.

Right now I have searched the forums an encountered the solution where you use <b>options from</b>

so far this is my code

<b>DATA: BEGIN OF TRAN_OPTS,

DISMODE TYPE CTU_PARAMS-DISMODE VALUE 'N',

UPDMODE TYPE CTU_PARAMS-UPDMODE VALUE 'S',

DEFSIZE TYPE CTU_PARAMS-DEFSIZE VALUE 'X',

NOBINPT TYPE CTU_PARAMS-NOBINPT,

RACOMMIT TYPE CTU_PARAMS-RACOMMIT,

SHOWMENU TYPE CTU_PARAMS-SHOWMENU,

NODBUPD TYPE CTU_PARAMS-NODBUPD,

END OF TRAN_OPTS.</b>

.

.

.

.

.

<b> CALL TRANSACTION 'VF02' USING BDCDATA

MESSAGES INTO BDCMSG

OPTIONS FROM TRAN_OPTS.</b>

unfortunatley the program would run an error message<b> "MODE ...", "UPDATE ..." or "AND SKIP FIRST SCREEN" expected after "BDCMSG".</b>, which I dont get at all. Is there something that I have to do before this? Thanks and good day.

13 REPLIES 13
Read only

naimesh_patel
Active Contributor
0 Likes
2,283

CALL TRANSACTION 'VF02' USING BDCDATA

MESSAGES INTO BDCMSG

mode 'E' " A - all screen, N - background, E- error

OPTIONS FROM TRAN_OP TS.

Regards,

Naimesh

Read only

Former Member
0 Likes
2,283

When you run a BDC, you need to specify the mode to run it in.

A = online, E = errors only, N = background.

CALL TRANSACTION 'VF02' USING BDCDATA

MODE 'N'

MESSAGES INTO BDCMSG

OPTIONS FROM TRAN_OPTS.

Hope this helps.

Sudha

Read only

0 Likes
2,283

Hi i tried both solutions same problem persists. Thanks

Message is <b>"UPDATE ..." or "AND SKIP FIRST SCREEN" expected after "'N'"</b>. I added update = 'S' but the error keeps on popping.

Read only

Former Member
0 Likes
2,283

Hi,

Try this way. It should work.


REPORT zztest.

DATA :  bdcdata   TYPE STANDARD TABLE OF bdcdata    WITH HEADER LINE.
DATA :  bdcmsg    TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.

<b>DATA :  tran_opts TYPE STANDARD TABLE OF ctu_params WITH HEADER LINE.</b>

tran_opts-dismode = 'N'.
tran_opts-updmode = 'S'.
tran_opts-defsize = 'X'.
.
.
.
.


<b>APPEND tran_opts.</b>


CALL TRANSACTION 'VF02' 
USING     bdcdata
MESSAGES INTO bdcmsg
OPTIONS  FROM tran_opts.

Regards,

AS

Read only

0 Likes
2,283

Same problem, even using the syntax to create a new program. Everything is fine until I put the <b>options from</b> statement.

Read only

0 Likes
2,283

hi

CALL TRANSACTION 'VF02' USING bdcdata OPTIONS FROM TRAN_OPTIONS MESSAGES INTO messtab.

you have to set these parameters in the beginning

TRAN_OPTIONS-defsize = 'X'.

TRAN_OPTIONS-dismode = 'N'.

TRAN_OPTIONS-updmode = 'S'.

Regards,

Sangram

Read only

0 Likes
2,283

The error I am getting now is "OPTIONS FROM TRAN_OPTS" is not expected.

For reference here is the mock code I created based on the solutions given to me thus far. Thanks

<b>REPORT ZTEST_TEST2 .

DATA : BDCDATA TYPE STANDARD TABLE OF BDCDATA WITH HEADER LINE.

DATA : BDCMSG TYPE STANDARD TABLE OF BDCMSGCOLL WITH HEADER LINE.

DATA : TRAN_OPTSX TYPE STANDARD TABLE OF CTU_PARAMS WITH HEADER LINE.

DATA: TRAN_OPTS LIKE LINE OF TRAN_OPTSX.

TRAN_OPTS-DISMODE = 'N'.

TRAN_OPTS-UPDMODE = 'S'.

TRAN_OPTS-DEFSIZE = 'X'.

CALL TRANSACTION 'VF02' USING BDCDATA

OPTIONS FROM TRAN_OPTS MESSAGES INTO BDCMSG.</b>

note: if you dont include the Options From, the program will have no syntax errors.

Read only

Former Member
0 Likes
2,284

Make the following changes in your code. Workin fine for me.


REPORT zztest.

DATA :  bdcdata   TYPE STANDARD TABLE OF bdcdata    WITH HEADER LINE.
DATA :  bdcmsg    TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.

DATA :  tran_optsx TYPE STANDARD TABLE OF ctu_params WITH HEADER LINE.


tran_optsx-dismode = 'N'.
tran_optsx-updmode = 'S'.
tran_optsx-defsize = 'X'.

<b>APPEND  tran_optsx.</b>


CALL TRANSACTION 'VF02' USING bdcdata
    OPTIONS  FROM tran_optsx
    MESSAGES INTO bdcmsg.



Regards,

AS

Message was edited by: Arun Sambargi

Read only

0 Likes
2,283

I already tried that, still same issue.

Sorry to bother most of you.

Is it possible that the existance of Options from is not found in certain versions? Thanks

Read only

0 Likes
2,283

Whats the error message, Just copy my code and check for syntax, it is no giving me any error. Nothing mentioned in Documentation with regard to the usage of OPTIONS wrt versions.

<b>AS</b>

Read only

0 Likes
2,283

After copying the code (exactly) The error message is

<b>"OPTIONS FROM TRAN_OPTSX" is not expected.</b>

Read only

0 Likes
2,283

The code is workin perfecy for me <b>strange its not working for you</b>, I tested the code before posting it, and tested it once again now.

<b>AS</b>

Read only

0 Likes
2,283

HI arun

can u plz send me the whole code that u have devloped for this BDC. Its urgent for me

Can you please post it on this thread

Regards

shilpa