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

lsmw

Former Member
0 Likes
779

i need to create a selection screen having a parameter to choose file name and path, then upload file from presentation server and two radiobuttons to choose whether it will be background processig or foreground processing. then i need to continue with lsmw where we want to skip the step 7 which is for uploading file from pc. and one more step to select processing type. how can it be done? can u pls help.

i need to create a selection screen having a parameter to choose file name and path, then upload file from presentation server and two radiobuttons to choose whether it will be background processig or foreground processing. then i need to continue with lsmw where we want to skip the step 7 which is for uploading file from pc. and one more step to select processing type. how can it be done? can u pls help.

4 REPLIES 4
Read only

Former Member
0 Likes
639

Make a report with all the neccessary selection screen parameters line ur checkboxs, file name, etc.

Upload ur file using FM GUI_UPLOAD

And process it using BDC recording instead of LSMW.

<b><REMOVED BY MODERATOR></b>

Cheers.

Message was edited by:

Alvaro Tejada Galindo

Read only

Former Member
0 Likes
639

hi ritu,

The selection-screen should be like this.

PARAMETERS : READPATH LIKE RLGRAP-FILENAME OBLIGATORY.

all the logic u have to put in a even called at-selection-screen output.

This is an example code only.

LOOP AT SCREEN.

  • IF SCREEN-GROUP1 = 'PER'.

  • IF NOT SCREEN-NAME CS SV_SELECTOPTION_NAME OR

  • SV_SELECTOPTION_NAME IS INITIAL OR

  • MCRSV-XDYNPER = TRUE.

    • Periodenfeld <> Periodenfeld zur Periodizität der Info-Struktur

    • oder Dynamische Periodenberechnung bei Selektionsversion =>

    • Periodenfeld zur Periodizität muß ausgeblendet werden

  • SCREEN-ACTIVE = OFF.

  • SCREEN-INVISIBLE = ON.

  • ELSE. "

  • Hier.selektion: eventuell grau-blenden des Datums

if screen-group3 ne 'OPU'.

screen-input = on.

screen-active = on.

endif.

SEARCH SCREEN-NAME FOR SEL_HIER-SELOPT_NAME.

IF SY-SUBRC = 0.

SCREEN-INPUT = OFF.

SEARCH SCREEN-NAME FOR 'VALU_PUSH'.

IF SY-SUBRC = 0.

SCREEN-ACTIVE = OFF.

ENDIF.

ENDIF.

  • ENDIF.

MODIFY SCREEN.

endloop.

Regards

Yugandhar

Message was edited by:

Alvaro Tejada Galindo

Read only

Former Member
0 Likes
639

Hi use,

CALL FUNCTION 'WS_FILENAME_GET'

EXPORTING

DEF_FILENAME = ' '

DEF_PATH = ' '

MASK = ' '

MODE = '0'

TITLE = 'FILE NAME'

IMPORTING

FILENAME = DATASET.

<b><REMOVED BY MODERATOR></b>

Message was edited by:

Alvaro Tejada Galindo

Read only

Former Member
0 Likes
639

Here is one way of developing the solution going by the exact requirement

1> I assume you already have the LSMW ready.

2> Create a report program with required selection screen.

3> You can upload the file using FM GUI_UPLOAD (Presentation server) and download the data to application server path where read data is stored(The path is as given in Specify files in LSMW).

4> Now you can convert the read data by calling(use submit and return) the LSMW conversion program(eg /1CADMC/SAP_LSMW_CONV_00000073). The program name can be obtained by running the conversion in LSMW in debug mode.

5> You can get the path of the converted file using the FM /SAPDMC/LSM_FILE_INFO_GET.

6> Then you can have the final processing based on the LSMW object type

-> if it is Standard batch /direct input - call the standard program using the conversion file as selection parameter

-> if it is BDC recording - call the program /SAPDMC/SAP_LSMW_BI_RECORDING provide the session name and file name in application server.

7> You can run the created BDC sessions based on user input in background using the program RSBDCSUB. Incase user wants to run the session in foreground, then they can goto SM35 and run the session.

Hope this solution helps.