05-17-2006 5:39 PM
Hi All,
I have some issues related to <b>SAP Script</b> and <b>Dialog programming</b>.
Actually i have a <b>Dialog screen</b> already prepared in that i have to add One <b>BUTTON</b> on Application Tool Bar.
That i have done already.
Now when we hit on That button it should pop-up me <b>2</b> Input fields as <b>Sales Order Number</b> and
<b>PrinterNo LIKE NAST-LDEST</b>.
When i give both the above values i should be able to display <b>New SAP Script output</b> with data from Dialog SCreen.
Can anybody give me any sujjestions.
Any help in this regard will be appreciated.
Thanks in advance.
Thanks & Regards,
Prasad.
05-18-2006 6:01 AM
Hi Prasad,
The FM POPUP_GET_VALUES is the required FM...
Just check this code...
This will popup a dialog window with CARRID and CONNID values , which you can select to achieve your requirement.
REPORT ZSHAIL_1 .
data: itab type table of sval with header line.
itab-tabname = 'SFLIGHT'.
itab-fieldname = 'CARRID'.
append itab.
clear itab.
itab-tabname = 'SFLIGHT'.
itab-fieldname = 'CONNID'.
append itab.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
NO_VALUE_CHECK = ' '
popup_title = 'hello'
START_COLUMN = '5'
START_ROW = '5'
IMPORTING
RETURNCODE =
tables
fields = itab[]
EXCEPTIONS
ERROR_IN_FIELDS = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope your query is solved.
Regards,
SP.
05-17-2006 5:46 PM
Call Submit Program in ur dialog module Prgram is ur driver program for SAP Script
05-17-2006 5:46 PM
Sure, there's no problem there. I assume that you have your popup working, after the user enters the values and clicks green check(continue) on the dialog box, you must fire the sapscript using OPEN_FORM, WRITE_FORM, and CLOSE_FORM.
itcpo-tdimmed = 'X'.
itcpo-tdprogram = 'ZSDCSTOPNORDRPT'.
itcpo-tddest = 'LOCL'.
call function 'OPEN_FORM'
exporting
device = 'PRINTER'
language = sy-langu
options = itcpo
<b> dialog = 'X'</b> " Fires dialog mode
exceptions
others = 1.
call function 'WRITE_FORM'
exporting
window = 'MAIN'
exceptions
error_message = 01
others = 02.
call function 'CLOSE_FORM'
exceptions
others = 1.
Regards,
Rich Heilman
05-17-2006 6:13 PM
Hi,
Thank you very much for those replies.
That Pop-up screen also i have to prepare.
Can anybody tell me the wether there is any Function Module in which i can give User Input for some fields [2]and press Enter - Then it will call SAP Script with above code.
Can anybody give sujjestions.
Thanks & Regards,
Prasad.
05-17-2006 6:20 PM
Prasad,
I think there is a POPUP function which can accept one value, but it does not look professional enough to take the sales order details in your case.
My suggestion would be quickly create two fields on a screen, (MODAL) and develop it yourself and as such you can do validations for the order number in the PAI of that screen and then call the SAP Script.
Regards,
Ravi
Note : Please mark all the helpful answers
05-18-2006 4:47 AM
HI,
Does Anybody have the solution for the above!
SAP SCript Part is taken Care.
ONly thing that reamins now is i need to <b>Pop-Up</b> a Screen with <b>2 input fields</b> when i hit <b>PRINT</b> Button in Application Tool bar and then i can call SAP Script Output when after inputing the data in pop-up screen.
Does anybody know the solution[<b>Function Module</b>] for Pop-Up Screen with 2 input fields.
ANy help in this regard will be appreciated.
Thanks in advance.
Thanks & Regards,
Prasad.
05-18-2006 6:12 AM
I don't know if you can take care of your requirement in a pop-up box.. But you can try this..
create a normal screen and call it using
call screen 111 starting at 1 5 ending at 10 30.
05-18-2006 6:01 AM
Hi Prasad,
The FM POPUP_GET_VALUES is the required FM...
Just check this code...
This will popup a dialog window with CARRID and CONNID values , which you can select to achieve your requirement.
REPORT ZSHAIL_1 .
data: itab type table of sval with header line.
itab-tabname = 'SFLIGHT'.
itab-fieldname = 'CARRID'.
append itab.
clear itab.
itab-tabname = 'SFLIGHT'.
itab-fieldname = 'CONNID'.
append itab.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
NO_VALUE_CHECK = ' '
popup_title = 'hello'
START_COLUMN = '5'
START_ROW = '5'
IMPORTING
RETURNCODE =
tables
fields = itab[]
EXCEPTIONS
ERROR_IN_FIELDS = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope your query is solved.
Regards,
SP.
05-18-2006 7:13 AM
Hi All,
Hi sylendra Thank you very much for your reply.
Your function module has worked perfectly for me.
Earlier i was using <b>POPUP_GET_VALUES_DB_CHECKED</b>
It is stopping every time when i hit enter.
But POPUP_GET_VALUES has worked perfectly.
Thanks you and all for your valuable sujjestions.
Thanks,
Prasad.
05-18-2006 7:31 AM
Hi Prasad,
Happy to hear that your problem has been solved.
Please close the thread by awarding suitable points to the helpful answers..
Regards,
SP.