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

Table maintenance - Call Screen 2

Former Member
0 Likes
2,743

Dear Friend,

according to my requirement i wanted call table maintenance view 2nd screen.(data entering screen)

i have used BDC for that and call that bdc in the program.

it works

now problem is when i click on the back button (standard) it comes to maintenance view 1st screen (list view)

so i want to come back to main selection screen

my code is follows


DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.
*
start-of-selection.
*
*
  perform bdc_dynpro      using 'SAPMSVMA' '0100'.
  perform bdc_field       using 'BDC_CURSOR' 'VIEWNAME'.
  perform bdc_field       using 'BDC_OKCODE' '=UPD'.
  perform bdc_field       using 'VIEWNAME' 'ZSOD_APPRV_REG'.
  perform bdc_field       using 'VIMDYNFLDS-LTD_DTA_NO' 'X'.
  perform bdc_dynpro      using 'SAPLZSOD_APPRV_REG' '0001'.
  perform bdc_field       using 'BDC_CURSOR' 'ZSOD_APPRV_REG-NAME_TEXT(01)'.
  perform bdc_field       using 'BDC_OKCODE' '=NEWL'.
*
  call  TRANSACTION 'SM30' using bdcdata MODE 'E' UPDATE 'S' .
*
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
  CLEAR BDCDATA.
  BDCDATA-PROGRAM  = PROGRAM.
  BDCDATA-DYNPRO   = DYNPRO.
  BDCDATA-DYNBEGIN = 'X'.
  APPEND BDCDATA.

1 ACCEPTED SOLUTION
Read only

lijisusan_mathews
Active Contributor
0 Likes
2,402

HI,

I am not sure if i understood your problem properly, So correct me if I am..

First of all, instead of directly calling sm30 from your program, goto se93 and create a tcode ( parameter transaction ) for your table maintenance view. For this you have to give tcode as Sm30, and check the check box 'skip first screen' and below, in parameters, select viewname and give the name of your view and then update with value X.

Now call this Tcode form your program..

Will this satisfy your requirement?

26 REPLIES 26
Read only

madhu_vadlamani
Active Contributor
0 Likes
2,402

Hi,

I guess you can do in this way.Try to catch the function code of that button and write your code and call according to that.

Regards,

Madhu.

Read only

0 Likes
2,402

dear Madhu

how can i apply to my code

i just try to find function code by using break point after call transaction

but it triggered after finished the SM30.

Read only

0 Likes
2,402

Hi Nelson

I am guessing in this way.

perform bdc_dynpro using 'SAPMSVMA' '0100'.

perform bdc_field using 'BDC_CURSOR' 'VIEWNAME'.

perform bdc_field using 'BDC_OKCODE' '=UPD'

This is the code of your recording.In the same way bdc_okcode for that button , press f1 and see.Here check that screen number ,program name and see.

Regards,

Madhu.

Read only

0 Likes
2,402

Hi Madhu,

actually i cant get what you are telling and what i want to do, please describe

Read only

0 Likes
2,402

Hi Nelson,

+now problem is when i click on the back button (standard) it comes to maintenance view 1st screen (list view)

so i want to come back to main selection screen+

You want to come to the initial screen.Once your data filling is over in the screen you want to come to initial screen.What i am telling read the screen no,program and keep that code.

Regards,

Madhu.

Read only

0 Likes
2,402

hi write

when you press back button or on exit-command.

set screen 0

leave screen.

Read only

0 Likes
2,402

Madhu, I don't think it works, cuz it will go to maintenance screen and come back immediately before we enter any data. I faced the same problem and could never figure out a solution. If some one has a solution that worked it would be great!!.

Read only

0 Likes
2,402

hi Madhu,

i have selection screen and one command button

when i click on the Command button only call maintenance view screen 2(data enter screen)

so when i click on the back button i want to go to my selection screen but in current situation back button come to maintenance view screen 1 and if i click back again it come to sm30 screen when i click again only comes to selection screen

i want to skip these steps.

Read only

0 Likes
2,402

Nelson, Exit button (yellow) skips the screen 1 and comes back to the original program but it's not a solution.

Read only

Former Member
0 Likes
2,402

Hi Nelson,

Try using Leave to Screen 0 or call screen statements after the BDC.

Amuktha

Read only

lijisusan_mathews
Active Contributor
0 Likes
2,403

HI,

I am not sure if i understood your problem properly, So correct me if I am..

First of all, instead of directly calling sm30 from your program, goto se93 and create a tcode ( parameter transaction ) for your table maintenance view. For this you have to give tcode as Sm30, and check the check box 'skip first screen' and below, in parameters, select viewname and give the name of your view and then update with value X.

Now call this Tcode form your program..

Will this satisfy your requirement?

Read only

0 Likes
2,402

hi

no friend when i call as t code it come to screen 1 (list view)

i want call screen 2 directly

Read only

0 Likes
2,402

have you recorded till you reach screen 2 ?? I mean.. if you run ur recording with Display no screen ( background processing mode) does it stop at teh second screen ?

Read only

0 Likes
2,402

Hi

yes

see my code in first post

Read only

0 Likes
2,402

OK.. If your BDC reaches the correct screen while running from SHDB with mode 'E', it should/ will stop at that position when you assign a t-code to it.. Skip first screen parameter is used only to avoid the sm30 screen while execution..

If that solution does not work, can you try if you can take the main program,, and change the Gui status.. In Back there.. try giving SET SCREEN 0. ..

Read only

0 Likes
2,402

O sorry.. I forgot to mention the last part!!! after you create the Tcode.... record this Tcode using SHDB and record TEH nEW eNTRIES bUTTON... Now use call transaction 'tcode' .

Read only

0 Likes
2,402

Have you tried the 'AND SKIP FIRST SCREEN' Addition?

Read only

0 Likes
2,402

Hi Suzie,

dear actually didn't get with you, can you please describe little bit

Read only

0 Likes
2,402

Hi

i got what u point dear,

but i create tcode with call view

and i use it in BDC with call transaction

when i run it it works

but when i press the back button it come s to previous screen(list view)

Read only

0 Likes
2,402

OK.. I ll try..

First create a parameter transaction with your new view and make sure Skip first screen check box is checked ( for which the table maintenance generator is there). Also give update = 'X' in parameters along with the view name.

Now record this new transaction till the point of new entries.

Now call this code in your program.

Now it will not go to the sm30 initial screen when you click back...

But it might go to the list of entries .. If you want to skip that too, you have to change the GUi status back option..

try and tell me

Read only

0 Likes
2,402

Ok.. Now that you have a program . Take this program and take its gui status.. change the back funcion code and write set screen 0 . in it.

Read only

0 Likes
2,402

Hi Dear,

actually problem is..

i create a program for call Tcode in BDC

where i find function code

its in background process when i execute from program it runs when i press back it comes to list if i press back again only comes to program

Read only

0 Likes
2,402

Hey.. does it go to teh first list even when you click on teh Yellow (EXIT) button >

Read only

0 Likes
2,402

Try this.. from your table maintenance screen, you can take that particular screen in change mode rite?? In the flow logic fro that screen, write a new module for exit command.. Copy the contents of the current at exit command module, and make teh necesary changes tehre

Read only

0 Likes
2,402

I'll come back to this issue,

I'm using LEAVE TO SCREEN 0 with back button, but it leaves one screen, I want to skip two screens.

Please tell me how can I do this?

Read only

0 Likes
2,402

This message was moderated.