How do we call smartforms in abap program or web services
how do we call smartforms in abap program or web services
How many types of smartforms are there?
points will be rewarded
Hi
See this sample program
Using the fun module smartform is called from the program
Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
<b>call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'</b>
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function <b>FM_NAME</b>
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
<b>Reward points for useful Answers</b>
Regards
Anji
Similar Messages
-
How to debug the method in abap program
How to debug the method in abap program ?
Could you please give the solution.
Thanks
saiHi ,
Place break point at call method .
It takes u in to the method implementation .
Here u can analyse the method implementation ...
Reward if useful
Thanks
Jagadeesh.G -
Hi,
I want to call BAPI_MATERIAL_AVAILABILITY in ABAP program. Please give me some sample code how i can do this??? Please helphi,
REPORT YATP.
DATA: LV_TABIX LIKE SY-TABIX,
LT_WMDVSX LIKE BAPIWMDVS OCCURS 0 WITH HEADER LINE,
LT_WMDVEX LIKE BAPIWMDVE OCCURS 0 WITH HEADER LINE.
data ET_PROCUREMENT_ITEM LIKE BBPPOGN.
LV_TABIX = SY-TABIX.
CLEAR: LT_WMDVSX, LT_WMDVEX.
REFRESH: LT_WMDVSX, LT_WMDVEX.
Fill communication table
LT_WMDVSX-REQ_DATE = ET_PROCUREMENT_ITEM-DELIV_DATE.
LT_WMDVSX-REQ_QTY = ET_PROCUREMENT_ITEM-QUANTITY.
APPEND LT_WMDVSX.
Availability check with check rule '03'
CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
EXPORTING
PLANT = 'ALB1'
MATERIAL = '100000223'
UNIT = 'EA'
CHECK_RULE = '03'
TABLES
WMDVSX = LT_WMDVSX
WMDVEX = LT_WMDVEX
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC EQ 0.
READ TABLE LT_WMDVEX WITH KEY
COM_DATE = ET_PROCUREMENT_ITEM-DELIV_DATE.
IF SY-SUBRC EQ 0.
ET_PROCUREMENT_ITEM-AVAIL_QTY = LT_WMDVEX-COM_QTY.
ENDIF.
ENDIF.
write :/ et_procurement_item-avail_qty.
Loop at lt_wmdvex.
write : / lt_wmdvex-COM_QTY,
lt_wmdvex-BDCNT,
lt_wmdvex-REQ_QTY.
endloop.
This is my program but no value written for WMDVEX. -
HOW TO creat BAR CHART using ABAP Programming
DEAR ALL,
I want some help as to how to creat GRAPHICAL display using ABAP programing (BAR CHART) any sample codes Example will be very helpful.
Regards,
VJOn earlier versions, you can do something like this.
[code]
REPORT ZRICH_0005 .
DATA: BEGIN OF ITAB_DATA OCCURS 0,
DATANAME(15),
QUANTITY1 TYPE I,
QUANTITY2 TYPE I,
QUANTITY3 TYPE I,
END OF ITAB_DATA.
Data: BEGIN OF ITAB_OPTIONS OCCURS 0,
OPTION(20),
END OF ITAB_OPTIONS.
ITAB_DATA-DATANAME = 'Maple'.
ITAB_DATA-QUANTITY1 = 5500.
ITAB_DATA-QUANTITY2 = 6200.
ITAB_DATA-QUANTITY3 = 5900.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Oak'.
ITAB_DATA-QUANTITY1 = 3500.
ITAB_DATA-QUANTITY2 = 5200.
ITAB_DATA-QUANTITY3 = 4400.
APPEND ITAB_DATA.
ITAB_DATA-DATANAME = 'Cherry'.
ITAB_DATA-QUANTITY1 = 1800.
ITAB_DATA-QUANTITY2 = 2200.
ITAB_DATA-QUANTITY3 = 1900.
APPEND ITAB_DATA.
CALL FUNCTION 'GRAPH_MATRIX_3D'
EXPORTING
COL1 = 'Jan'
COL2 = 'Feb'
COL3 = 'Mar'
TITL = 'Lumber Usage in $'
TABLES
DATA = ITAB_DATA
OPTS = ITAB_OPTIONS
EXCEPTIONS
OTHERS = 1.
[/code]
Regards,
Rich Heilman -
Call an ABAP Program from Web Application designer
Hi Gurus,
I have an requirement in which I need to fetch an CSV file from the server and place the file into an internal table in R/3.I got the function module and wrote the program for this,but now I need to call this ABAP program from Web Application designer.
To make it more explicit ,I need to call an ABAP Program /function module from the WAD.I am new to WAD Please help.
AnkitHi Ankit,
take a look:
/thread/725385 [original link is broken]
WAD and ABAP
How to call a ABAP or ABAP Class from the WEB
/people/kai.wachter/blog/2008/03/11/how-to-write-own-items-in-bi-70-java-runtime
Regards
Andreas -
Code to call url in abap program
code to call url in abap program using cl_http requests and save the outcome to a location in a file
See the below program
REPORT zbrowser .
TABLES : sscrfields.
INCLUDE .
CONSTANTS: htmlcntl_eventid_on_navigate TYPE i VALUE 1.
CONSTANTS: htmlcntl_eventid_navigate_com TYPE i VALUE 2.
DATA : h_html_ctrl TYPE cntl_handle,
repid TYPE sy-repid,
dynnr TYPE sy-dynnr,
cmd TYPE sy-ucomm,
flag,disp.
DATA : it_exclude LIKE TABLE OF rsexfcode WITH HEADER LINE.
SELECTION-SCREEN : FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3,
FUNCTION KEY 4,
FUNCTION KEY 5.
General Browser to View
Files/Pictures & WebPages
© 2005 SAP AG 2
SELECTION-SCREEN COMMENT 45(50) comment1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(28) comment2 FOR FIELD url.
SELECTION-SCREEN POSITION 31.
PARAMETERS : url(1064) LOWER CASE .
SELECTION-SCREEN PUSHBUTTON 79(4) open USER-COMMAND open.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
comment1 = 'ABAP INTERNET EXPLORER'.
comment2 = 'Enter URL/Filename To Open :'.
open = icon_transfer .
sscrfields-functxt_05 = icon_sap.
sscrfields-functxt_04 = icon_booking_stop.
sscrfields-functxt_03 = icon_refresh.
sscrfields-functxt_02 = icon_arrow_right.
sscrfields-functxt_01 = icon_arrow_left.
repid = sy-repid.
dynnr = '1000'.
it_exclude-fcode = 'ONLI'.
APPEND it_exclude.
it_exclude-fcode = 'INFO'.
APPEND it_exclude.
*Changing GUI status
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
p_program = repid
TABLES
p_exclude = it_exclude.
CALL FUNCTION 'CONTROL_INIT' .
IF sy-subrc <> 0.
EXIT.
ENDIF.
CALL FUNCTION 'HTMLCNTL_CREATE'
EXPORTING
owner_repid = repid
link_repid = repid
dynnr = dynnr
handle = h_html_ctrl
EXCEPTIONS
control_install_error = 1
create_error = 2
General Browser to View
Files/Pictures & WebPages
© 2005 SAP AG 3
OTHERS = 3
IF sy-subrc <> 0.
EXIT.
ENDIF.
CALL FUNCTION 'HTMLCNTL_INIT'
EXPORTING
h_control = h_html_ctrl
left = 1
top = 2
width = 143
height = 37
register_event_on_navigate = 'X'
cb_form_navigate_complete = 'ON_CONTROL_EVENT'
EXCEPTIONS
cntl_system_error = 1
cntl_error = 2
dp_create_error = 3
dp_install_error = 4
dp_error = 5
create_browser_error = 6
init_error = 7
OTHERS = 8
IF sy-subrc <> 0.
EXIT.
ENDIF.
CALL FUNCTION 'CONTROL_FLUSH'.
AT SELECTION-SCREEN.
cmd = sscrfields-ucomm.
CASE cmd.
WHEN 'OPEN'.
PERFORM load_html_page.
CALL FUNCTION 'CONTROL_FLUSH'.
WHEN 'FC01'. "BACK
CALL FUNCTION 'HTMLCNTL_GO_BACK'
EXPORTING
h_control = h_html_ctrl.
IF sy-subrc <> 0.
EXIT.
ENDIF.
General Browser to View
Files/Pictures & WebPages
© 2005 SAP AG 4
PERFORM get_current_url.
WHEN 'FC02'. "FORWARD
CALL FUNCTION 'HTMLCNTL_GO_FORWARD'
EXPORTING
h_control = h_html_ctrl.
IF sy-subrc <> 0.
EXIT.
ENDIF.
PERFORM get_current_url.
WHEN 'FC03'. "REFRESH
CALL FUNCTION 'HTMLCNTL_DO_REFRESH'
EXPORTING
h_control = h_html_ctrl.
IF sy-subrc <> 0.
EXIT.
ENDIF.
PERFORM get_current_url.
WHEN 'FC04'. "STOP
CALL FUNCTION 'HTMLCNTL_STOP'
EXPORTING
h_control = h_html_ctrl.
IF sy-subrc <> 0.
EXIT.
ENDIF.
WHEN 'FC05'. "GO TO HOME
CALL FUNCTION 'HTMLCNTL_GO_HOME'
EXPORTING
h_control = h_html_ctrl.
IF sy-subrc <> 0.
EXIT.
ENDIF.
PERFORM get_current_url.
CALL FUNCTION 'CONTROL_FLUSH'.
WHEN OTHERS.
General Browser to View
Files/Pictures & WebPages
© 2005 SAP AG 5
CALL FUNCTION 'CONTROL_DISPATCH'
EXPORTING
fcode = cmd.
CALL FUNCTION 'CONTROL_FLUSH'.
ENDCASE.
CLEAR cmd.
CALL FUNCTION 'CONTROL_FLUSH'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR url.
PERFORM get_file_name.
PERFORM load_html_page.
*& Form get_page_name
Get Page Name
FORM get_file_name.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = ' '
def_path = 'C: '
mask = ',.,..'
mode = 'o'
title = 'Browse to Open'
IMPORTING
filename = url
RC =
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDFORM. " get_page_name
*& Form load_html_page
TO load the file (URL)
General Browser to View
Files/Pictures & WebPages
© 2005 SAP AG 6
FORM load_html_page.
CALL FUNCTION 'HTMLCNTL_SHOW_URL'
EXPORTING
h_control = h_html_ctrl
url = url.
IF sy-subrc <> 0.
EXIT.
ENDIF.
flag = 'X'.
ENDFORM. " load_html_page
*& Form get_current_url
Get Current URL
FORM get_current_url.
CALL FUNCTION 'HTMLCNTL_GET_CURRENT_URL'
EXPORTING
h_control = h_html_ctrl
IMPORTING
url = url.
ENDFORM. " get_current_url
Callback form for the event 'NavigateComplete'
callback on_control_event.
CALL FUNCTION 'CONTROL_GET_EVENT_PARAM'
EXPORTING
h_control = h_html_ctrl
param_id = 0
CHANGING
return = url.
PERFORM get_current_url.
endcallback.
Reward Points if it is helpful
Thanks
Seshu -
Is it possible to call website from ABAP Program?
Hi Experts,
Is it possible to call website from ABAP Program?
It is very Urgent Help me.
Regards,
Ashok.Hi,
Check the following program:
REPORT ZURL NO STANDARD PAGE HEADING.
DATA: BEGIN OF URL_TABLE OCCURS 10,
L(25),
END OF URL_TABLE.
URL_TABLE-L = 'http://www.lycos.com'.APPEND URL_TABLE.
URL_TABLE-L = 'http://www.hotbot.com'.APPEND URL_TABLE.
URL_TABLE-L = 'http://www.sap.com'.APPEND URL_TABLE.
LOOP AT URL_TABLE.
SKIP. FORMAT INTENSIFIED OFF.
WRITE: / 'Single click on '.
FORMAT HOTSPOT ON.FORMAT INTENSIFIED ON.
WRITE: URL_TABLE. HIDE URL_TABLE.
FORMAT HOTSPOT OFF.FORMAT INTENSIFIED OFF.
WRITE: 'to go to', URL_TABLE.
ENDLOOP.
CLEAR URL_TABLE.
AT LINE-SELECTION.
IF NOT URL_TABLE IS INITIAL.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
program = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE'
commandline = URL_TABLE
INFORM = ''
EXCEPTIONS
PROG_NOT_FOUND = 1.
IF SY-SUBRC <> 0.
WRITE:/ 'Cannot find program to open Internet'.
ENDIF.
ENDIF.
Regards,
Bhaskar -
How to make a transport of ABAP Program to a QA environment
Hi forum and sorry for my easy question, but i am a newby in ABAP
How can i a transport an ABAP program to QA environment?... is the same machine only changes the mandant.
Thnks
Josue CruzYou need have transport request for ABAP program.
Transport Request are two types :
1.customizing
2 work bench
customizing - it is related to SPRO Transaction and Functional people will create Customizing request
Work Bench Request - normally irt realeted to ABAP Develper. and all about SE38 Programs ,Data dictinary and so on..
If you want to to release transport request ,then you need to use SE10 or SE09 Transaction.
Goto SE10 and see ur transport request -.it will have sub request #
Select Sub request #->overall check -Syntax check
then Activate check
then click on release dirctly button(Looks like Bus)
activate
now select main request and click on release directly button.
check the status - by using transport logs at SE10 transaction,you need to have sy-subrc eq 0
when you get sy-subrc eq 4 then you deleted something in ur program ,sy-subrc eq 8,sy-subrc eq 12 these all status of ur transport request.
once you done then you need import to Tst Box,use STMS Transaction.
Reward Points if it is useful
Thanks
Seshu -
Calling Actions in ABAP Programming.
Hi,
Is it possible to call ACTIONS in ABAP programming?
Regards,Hi Pushpa,
The receiver type is the workflow you want to start, when the event occurs, of corresponding object type.
I Never had the need to develop at workflow level, but search a little in the foruns and you'll find a lot of info about this. I also advice you to open new threads when asking new questions: It's more appropriate and will bring you more answers
Kind regards,
Garcia -
I want to write ABAP Program in web dynpro Using se80 tra.code
hi
I want to write ABAP Program in web dynpro Using se80 tra.code and to Create URL for the same.
Please let me know the steps to do.
ThanksHi Shiva,
I understood , you want to create a Webdynpro Applicaiton and run it.
this will help you
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cb243c45-0801-0010-eb9c-88669007f130
Regards
Abhimanyu -
How to use a deployable proxy to consume a web service?
HI Gurus,
I am following this article below which helpfully explains how to create a proxy. So far so good. I have been able to create a proxy. However, the article only describes how to build a proxy.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c7d0f7-153d-2a10-5d96-d334b67cd771
In the concluding part of the document the author says "In my next article I will tell you how to use this deployable proxy to consume the web service in web application."
I have looked around the SDN but have not been able to get the next part of this document.
I have a JSPDynpage application which is required to consume a webservice. I want to use this proxt to consume the webservice.
Any help or any other document that explains how to use a deployable proxy to consume a web service will be helpful.
Thanks,
SBHi,
Here is an example how to consume the deployable proxy in web application:
http://help.sap.com/saphelp_nw70/helpdata/EN/ca/c8efe3e8a64163b01924ad4ccd706d/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/EN/5c/971740198d8f5ce10000000a155106/frameset.htm
Regards,
Praveen Gudapati -
How to assign Tasks to other users using Exchange Web Service.
How to assign Tasks to other users using Exchange Web Service.
Any workaround also would helpHi Glen,
I am trying to use ExtendedPropertyType and put in UpdaterItemType as in this code as below. Although it is not updating the Owner
field.
I have tried it both by Propertyname and PropertyID. Although new custom property's canbe
added but to change an existing one like 'Owner' ? Would this be the right method.
2. And Is ProprertyID a fixed value as 0x811f or does it need to be calculated.
3. Is 'Owner' the right propertname for assigning a task ?
Thanks a lot.
Please see code below for reference.
PathToExtendedFieldType pathExtended = new PathToExtendedFieldType();
//pathExtended.DistinguishedPropertySetId = DistinguishedPropertySetType.PublicStrings;
pathExtended.DistinguishedPropertySetId = DistinguishedPropertySetType.Task;
pathExtended.DistinguishedPropertySetIdSpecified = true;
pathExtended.PropertyId = 0x811f;
pathExtended.PropertyIdSpecified = true;
//pathExtended.PropertyName = "Owner";
pathExtended.PropertyType = MapiPropertyTypeType.String;
ciSetAT.ExtendedProperty = new ExtendedPropertyType[1];
ciSetAT.ExtendedProperty[0] = new ExtendedPropertyType();
ciSetAT.ExtendedProperty[0].ExtendedFieldURI = pathExtended;
ciSetAT.ExtendedProperty[0].Item = "[email protected]";
SetItemFieldType set1 = new SetItemFieldType();
set1.Item = pathExtended;
set1.Item1 = ciSetAT;
UpdateItemType request = new UpdateItemType();
request.ItemChanges = new ItemChangeType[1] { new ItemChangeType() };
request.ItemChanges[0].Item = itemId;
request.ItemChanges[0].Updates = new ItemChangeDescriptionType[2];
request.ItemChanges[0].Updates[0] = setstart;
request.ItemChanges[0].Updates[1] = set1; -
How can i print data in smartforms from ABAP program.
Dear gurus:
in my abap program i process require data, and saved in a internal table.
how can l print the data in smartforms.?
who can give me a code sample is better:)
reward all helpful advise.Try this....
1) Tcode --> SmartForms
2) Form name --> Z_SF_TEST Create
3) Under Global settings
a) Form Interface
Table Tab
ITAB LIKE EKPO
b) GLOBAL Definitions
WA_NETPR LIKE EKPO-NETPR
In smart forms if we want to display quantity and currency fields. We can't directly display currency field and quantity fields
For that we have to create an extra variable in global definitions
Ex: netpr FIELD of EKPO
CREATE program lines and specify WA_NETWR = itab-netpr.
4) RT CLick on main Window
CREATE --> TABLE
Click Table painter
DEFAULT %LTYPE will be Created
a) If you want more like Header footer etc add by rt click on %LTYPE1
Table (Tab)
%LTYPE Radio(SELECT) 5 CM 5 CM 6 CM
CLICK on DATA (Tab)
INTERNAL TABLE ITAB LIKE ITAB
5)RT click on table control and create --> program lines
General attribute (Tab)
INPUT PARAMETER OUTPUT PARAMETER
itab WA_NETPR
Code Area
WA_NETWR = ITAB-NETPR.
6) RT CLcick on table ctl and create 3 text to display the fields
a) % text1 +button(insert field)
FIELD name &itab-ebeln&
Output options (tab)
Check New line LINETYPE %Ltype1
check new cell
b) % text2
& itab-ebelp&
output options
check new cell
c) % text2
& wa_netpr&
output options
check new cell
<b>Report ac
Tables ekpo.
Data: itab1 like ekpo occurs 0 with header line.
select * into table itab1 from ekpo.
Call function module --> smart form function module and pass your internal table</b>
Regards,
SaiRam -
How to create relationship to call PO13 in ABAP program.
Hi,
Could anybody help me how to create relationship (like PO13) in abap program. Do we have any Function modules or any other way?
Regards,
Ram.Hi,
You can use function module RH_INSERT_INFTY. There are plenty of threads of the forum on how to use it.
Donnie -
How to call view in abap program
HI,
Is that possible to call & display view in the abap program.
Thanks & Regards
GuhapriyanHi,
You can declare a view using the tables statement itself.
For example -
tables AUFKV.
Regards,
Anand Mandalika.
Maybe you are looking for
-
Problem with USB External Hard Disk Drive
I have similar problem with hard disk MK6025GAS in Sweex casing connected via USB as Raistlfiren in this post but I am not sure if it has something to do with kernel. The problem is that when I plug the hard disk via USB it is not even shown with in
-
Hi everybody! In my scenario I post an RFC call to a BAPI (BAPI_GOODSMVT_CREATE). The call succeeds (empty RETURN parameter, material document numer is returned). However, the resulting material document is not available in MB03 - I assume this is du
-
In outlook 2010 can you change the meeting organizer?
I need to subsitute a co-worker as the organizer of a meeting setup in Outlook 2010. Can/How do I do that?
-
Hiding / Filtering nodes in a JTree
I'm not exactly sure how to temporarily hide or filter nodes from a JTree. My scenario is described below. I have a radio button group. If the first radio button is selected, all nodes are displayed. If the second button is selected, certain nodes ar
-
Signature disappear when i merge the documents
Hi everyone, I have a problem, a big problem with adobe. When i merge some documents, all the electronic signature disappear. It's umbelivable because PDF Creator can do it. So does anybody know why the electronic signature disappear. Just to explain