Problem in executing a smartform URGENT!!
HI,
I created a template in my layout and created a structure
z_tab which i had to pass in the smartform now
my problem is
in form interface i gave i_tab type z_tab
and in template-> text iam adding a feild&i_tab-raw&( this is my feild name which i have to show in output) and in se38 my interface program i gave the necessary.
But iam getting error saying
"Reference field I_TAB-RAW unknown in form."
please help its urgent
Thank you
the reference field which i gave in the structure was making this problem it was currency field and reference table was mismatched.
Thankyou for replying raam & rahul.
Similar Messages
-
Problem in executing EXE from browser-URGENT
Hi all,
I am facing a problem in executing "c exe" file from my web based application, iam using IAS
on Solaris. my program is able to catch the path but its not executing (this is wirking fine in windows) i am giving a sample code here
Runtime rt=Runtime.getRuntime();
Process pro=rt.exec("/datadisk1/java/runsol.exe");
pro.waitFor();
runsol.exe will generate s text file when executed, when i run this in a independent java program then it is executing, on browser it is not executing and output text file is not creating.
Note: i am working on Solaris / Oracle AS 9i
Thanks
Bye.Security issue. Calling .exe from applet not possible by default.
-
How to use CALL FUNCTION '/1BCDWB/SF00000014' in smartform urgent
hiiiiiiiii
Iam doing classical report n i want my output to be printed in smartform.
So my output is in IT_FINAL table.In smartform in Form Interface Table column i had declare :::
Parameter Name: IT_FINAL
Type Assignment:LIKE
Associated Type:ZSD_FINAL ( Its a structure of IT_FINAL)
And in SE38..iam using...............
data: FM_NAME1 type RS38L_FNAM.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZCSF_SDPRSR03_PR'
importing
FM_NAME = FM_NAME1.
CALL FUNCTION FM_NAME1
EXPORTING
IT_FINAL = IT_FINAL.
So while running its giving dump..
I DONT KNOW HOW TO USE THE ABOVE FUNCTION MODULE.
CALL FUNCTION '/1BCDWB/SF00000014'
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 =
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.
Please suggest me with example if possible......URGENT.
(Rewards if solved)
Regards.Hi
see the below doc and do accordingly
How to create a New smartfrom, it is having step by step procedure
http://sap.niraj.tripod.com/id67.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Here is the procedure
1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. 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
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
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'</b>
exporting
formname = 'ZSMARTFORM'
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.
<b>call function 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.
Smartform
you can check this link here you can see the steps and you can do it the same by looking at it..
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
SMARTFORMS STEPS.
1. In Tcode se11 Create a structure(struct) same like the Internal table that you are going to use in your report.
2. Create Table type(t_struct) of stracture in se11.
3. In your program declare Internal table(Itab) type table of structure(struct).
4. Define work area(wa) like line of internal table.
5. Open Tcode Smartforms
6. In form Global setting , forminterface Import parameter define Internal table(Itab) like table type of stracture(t_struct).
7. In form Global setting , Global definitions , in Global data define Work area(wa) like type stracture(struct).
8. In form pages and window, create Page node by default Page1 is available.
9. In page node you can create numbers of secondary window. But in form there is only one Main window.
10. By right click on page you can create windows or Go to Edit, Node, Create.
11. After creating the window right click on window create table for displaying the data that you are passing through internal table.
12. In the table Data parameter, loop internal internal table (Itab) into work area(wa).
13. In table there are three areas Header, Main Area, Footer.
14. Right click on the Main area create table line by default line type1 is there select it.
15. Divide line into cells according to your need then for each cell create Text node.
16. In text node general attribute. Write down fields of your work area(wa) or write any thing you want to display.
17. Save form and activate it.
18. Then go to Environment, function module name, there you get the name of function module copy it.
19. In your program call the function module that you have copied from your form.
20. In your program in exporting parameter of function pass the internal table(itab).
SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
configure forms with data from an SAP System for the relevant business processes.
To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
SAP Smart Forms also support postage optimizing.
Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
What Transaction to start SAP Smart Forms?
Execute transaction SMARTFORMS to start SAP Smart Forms.
Key Benefits of SAP Smart Forms:
SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
These actions do not include writing of coding lines or using a Script language.
Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
For Web publishing, the system provides a generated XML output of the processed form.
Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
SmartForms System Fields
Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
System fields of Smart Forms
&SFSY-DATE&
Displays the date. You determine the display format in the user master record.
&SFSY-TIME&
Displays the time of day in the form HH:MM:SS.
&SFSY-PAGE&
Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
&SFSY-FORMPAGES&
Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
&SFSY-JOBPAGES&
Contains the total page number of all forms in the currently processed print request.
&SFSY-WINDOWNAME&
Contains the name of the current window (string in the Window field)
&SFSY-PAGENAME&
Contains the name of the current page (string in the Page field)
&SFSY-PAGEBREAK&
Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
&SFSY-MAINEND&
Is set as soon as processing of the main window on the current page ends
&SFSY-EXCEPTION&
Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
Example Forms Available in Standard SAP R/3
SF_EXAMPLE_01
Simple example; invoice with table output of flight booking for one customer
SF_EXAMPLE_02
Similar to SF_EXAMPLE_01 but with subtotals
SF_EXAMPLE_03
Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
Advantages of SAP Smart Forms
SAP Smart Forms have the following advantages:
1. The adaption of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with data from an SAP system. Consultants are only required in special cases.
2. Displaying table structures (dynamic framing of texts)
3. Output of background graphics, for form design in particular the use of templates which were scanned.
4. Colored output of texts
5. User-friendly and integrated Form Painter for the graphical design of forms
6. Graphical Table Painter for drawing tables
7. Reusing Font and paragraph formats in forms (Smart Styles)
8. Data interface in XML format (XML for Smart Forms, in short XSF)
9. Form translation is supported by standard translation tools
10. Flexible reuse of text modules
11. HTML output of forms (Basis release 6.10)
12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10)
Regards
Anji -
Problem to convert a Smartform a PDF
Hello everybody,
I revised the forum and found several solutions to this. But I have the following problem: when execute the functions that transforms Smartforms to PDF in R3 this generates BinField good. But when I run the model from WebDynpro and attempted access to the field BinFile (returns for model) I get this error:
java.lang.ArrayIndexOutOfBoundsException: -1
It's as if the data is not in the field, as if the function dont get it. But when I run into R3 works fine.
I'm doing next to initialize the model structure:
Zbapi_Wty_Print_Claim_Input BapiWtyPrintClaim =
new Zbapi_Wty_Print_Claim_Input();
wdContext.nodeZbapi_Wty_Print_Claim_Input().bind(BapiWtyPrintClaim);
Someone knows how to solve this?Hello everybody,
I revised the forum and found several solutions to this. But I have the following problem: when execute the functions that transforms Smartforms to PDF in R3 this generates BinField good. But when I run the model from WebDynpro and attempted access to the field BinFile (returns for model) I get this error:
java.lang.ArrayIndexOutOfBoundsException: -1
It's as if the data is not in the field, as if the function dont get it. But when I run into R3 works fine.
I'm doing next to initialize the model structure:
Zbapi_Wty_Print_Claim_Input BapiWtyPrintClaim =
new Zbapi_Wty_Print_Claim_Input();
wdContext.nodeZbapi_Wty_Print_Claim_Input().bind(BapiWtyPrintClaim);
Someone knows how to solve this? -
Problem in code.it is urgent.
problem in code.it is urgent.
i want to display all po,s with all grs from requistion up to inspection. if for a po gr not happend or inspection not happend it must also display leaving blank for that po. actual flow is pur.reqpur.ordergoods receipt---quality inspection. once u copy this code and execute it. u will get better idea.
regards!
prasad.
REPORT Z_MM_REQDETAILS1.
TABLES: EKKO, EKPO, MSEG, QALS, EBAN, MKPF, MAKT.
TYPE-POOLS: SLIS.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
SELECT-OPTIONS: SBADAT FOR EBAN-BADAT,
SLIFNR FOR EKKO-LIFNR,
SEBELN FOR EKKO-EBELN,
SBEDAT FOR EKKO-BEDAT,
SBSART FOR EKKO-BSART,
SMATNR FOR EKPO-MATNR,
SBUDAT FOR MKPF-BUDAT.
SELECTION-SCREEN END OF BLOCK B1.
DATA: BEGIN OF EBAN_TAB OCCURS 0,
BANFN LIKE EBAN-BANFN,
BADAT LIKE EBAN-BADAT,
MENGE LIKE EBAN-MENGE,
EBELN LIKE EBAN-EBELN,
AFNAM LIKE EBAN-AFNAM,
END OF EBAN_TAB.
DATA: BEGIN OF EKKO_TAB OCCURS 0,
BSART LIKE EKKO-BSART,
EBELN LIKE EKKO-EBELN,
LIFNR LIKE EKKO-LIFNR,
BEDAT LIKE EKKO-BEDAT,
END OF EKKO_TAB.
DATA: BEGIN OF EKPO_TAB OCCURS 0,
EBELN LIKE EKPO-EBELN,
MENGE LIKE EKPO-MENGE,
MATNR LIKE EKPO-MATNR,
BANFN LIKE EKPO-BANFN,
EBELP LIKE EKPO-EBELP,
END OF EKPO_TAB.
DATA: BEGIN OF MSEG_TAB OCCURS 0,
EBELN LIKE MSEG-EBELN,
MBLNR LIKE MSEG-MBLNR,
MATNR LIKE MSEG-MATNR,
MENGE LIKE MSEG-MENGE,
EBELP LIKE MSEG-EBELP,
END OF MSEG_TAB.
DATA: BEGIN OF MSEG_TAB1 OCCURS 0,
MBLNR LIKE MSEG-MBLNR,
EBELN LIKE MSEG-EBELN,
END OF MSEG_TAB1.
DATA: BEGIN OF QALS_TAB OCCURS 0,
LMENGE01 LIKE QALS-LMENGE01,
LMENGE07 LIKE QALS-LMENGE07,
MATNR LIKE QALS-MATNR,
MBLNR LIKE QALS-MBLNR,
EBELN LIKE QALS-EBELN,
EBELP LIKE QALS-EBELP,
END OF QALS_TAB.
DATA: BEGIN OF MKPF_TAB OCCURS 0,
MBLNR LIKE MKPF-MBLNR,
BUDAT LIKE MKPF-BUDAT,
END OF MKPF_TAB.
DATA: BEGIN OF MAKT_TAB OCCURS 0,
MATNR LIKE MAKT-MATNR,
MAKTX LIKE MAKT-MAKTX,
END OF MAKT_TAB.
DATA: BEGIN OF SELTAB OCCURS 0,
EBELN LIKE EKKO-EBELN,
BLDAT LIKE MKPF-BLDAT,
END OF SELTAB.
*DATA: BEGIN OF SELTAB1 OCCURS 0,
BUDAT LIKE MKPF-BUDAT,
END OF SELTAB1.
DATA: REPID LIKE SY-REPID.
DATA: F_OUTPUT1 TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE.
DATA: REMARKS(40) TYPE C.
DATA: BEGIN OF OUTPUT OCCURS 0,
BANFN LIKE EBAN-BANFN,
BADAT LIKE EBAN-BADAT,
RMENGE LIKE EBAN-MENGE,
AFNAM LIKE EBAN-AFNAM,
BSART LIKE EKKO-BSART,
EBELN LIKE EKKO-EBELN,
LIFNR LIKE EKKO-LIFNR,
BEDAT LIKE EKKO-BEDAT,
PMENGE LIKE EKPO-MENGE,
MATNR LIKE EKPO-MATNR,
EBELP LIKE EKPO-EBELP,
MBLNR LIKE MSEG-MBLNR,
GMENGE LIKE MSEG-MENGE,
LMENGE01 LIKE QALS-LMENGE01,
LMENGE07 LIKE QALS-LMENGE07,
BUDAT LIKE MKPF-BUDAT,
MAKTX LIKE MAKT-MAKTX,
REMARKS(40) TYPE C,
SL_NO LIKE SY-TABIX,
END OF OUTPUT.
START-OF-SELECTION.
IF SEBELN IS NOT INITIAL OR SLIFNR IS NOT INITIAL OR SBEDAT IS NOT INITIAL OR SBSART IS NOT INITIAL.
SELECT EBELN
BSART
LIFNR
BEDAT FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB WHERE EBELN IN SEBELN AND LIFNR IN SLIFNR AND BEDAT IN SBEDAT AND
BSART IN SBSART.
ELSEIF SBADAT IS NOT INITIAL.
SELECT EBELN
BANFN
BADAT
MENGE
AFNAM FROM EBAN INTO CORRESPONDING FIELDS OF TABLE EBAN_TAB where BADAT IN SBADAT.
SORT EBAN_TAB BY BADAT ASCENDING.
select ebeln lifnr bedat bsart from ekko into corresponding fields of table ekko_tab for all entries in eban_tab where ebeln = eban_tab-ebeln.
ELSEIF SMATNR IS NOT INITIAL.
SELECT EBELN
EBELP
FROM EKPO INTO CORRESPONDING FIELDS OF TABLE SELTAB
WHERE MATNR IN SMATNR.
SORT SELTAB BY EBELN ASCENDING.
DELETE ADJACENT DUPLICATES FROM SELTAB COMPARING EBELN.
SELECT EBELN
BSART
BEDAT
LIFNR FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB
FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.
ELSEIF SBUDAT IS NOT INITIAL.
SELECT BUDAT
MBLNR FROM MKPF INTO CORRESPONDING FIELDS OF TABLE MKPF_TAB WHERE
BUDAT IN SBUDAT.
sort mkpf_tab by budat ascending.
SELECT EBELN FROM MSEG INTO CORRESPONDING FIELDS OF TABLE SELTAB FOR ALL ENTRIES IN
MKPF_TAB WHERE MBLNR = MKPF_TAB-MBLNR.
*SELECT EBELN
FROM QALS INTO CORRESPONDING FIELDS OF TABLE SELTAB FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.
SORT SELTAB BY EBELN ASCENDING.
DELETE ADJACENT DUPLICATES FROM SELTAB COMPARING EBELN.
SELECT EBELN
BEDAT
LIFNR
BSART FROM EKKO INTO CORRESPONDING FIELDS OF TABLE EKKO_TAB
FOR ALL ENTRIES IN SELTAB WHERE EBELN = SELTAB-EBELN.
ENDIF.
SELECT EBELN
MENGE
MATNR
EBELP FROM EKPO INTO CORRESPONDING FIELDS OF TABLE EKPO_TAB FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN AND
MATNR IN SMATNR.
SELECT EBELN
BANFN
BADAT
MENGE
AFNAM FROM EBAN INTO CORRESPONDING FIELDS OF TABLE EBAN_TAB FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN AND
BADAT IN SBADAT.
SELECT EBELN
MBLNR
MATNR
MENGE
EBELP
FROM MSEG INTO CORRESPONDING FIELDS OF TABLE MSEG_TAB FOR ALL ENTRIES IN EKPO_TAB WHERE EBELN = EKPO_TAB-EBELN AND
MATNR = EKPO_TAB-MATNR AND
EBELP = EKPO_TAB-EBELP AND
BWART IN ('101','105').
SELECT LMENGE01
LMENGE07
MATNR
MBLNR
EBELN FROM QALS INTO CORRESPONDING FIELDS OF TABLE QALS_TAB FOR ALL ENTRIES IN MSEG_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND
MATNR = MSEG_TAB-MATNR AND
EBELN = MSEG_TAB-EBELN AND
EBELP = MSEG_TAB-EBELP.
SELECT MBLNR
BUDAT FROM MKPF INTO CORRESPONDING FIELDS OF TABLE MKPF_TAB FOR ALL ENTRIES IN MSEG_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND BUDAT
IN SBUDAT.
SELECT MATNR
MAKTX FROM MAKT INTO CORRESPONDING FIELDS OF TABLE MAKT_TAB FOR ALL ENTRIES IN EKPO_TAB WHERE MATNR = EKPO_TAB-MATNR.
*LOOP AT OUTPUT.
**LOOP AT EKKO_TAB.
**read table EKKO_TAB with key ebeln = output-ebeln.
**if sy-subrc = 0.
*READ TABLE EKPO_TAB WITH KEY EBELN = EKKO_TAB-EBELN.
*IF SY-SUBRC = 0.
*READ TABLE MSEG_TAB WITH KEY EBELN = EKPO_TAB-EBELN MATNR = EKPO_TAB-MATNR.
*IF SY-SUBRC = 0.
**READ TABLE QALS_TAB WITH KEY MBLNR = MSEG_TAB-MBLNR MATNR = MSEG_TAB-MATNR EBELN = MSEG_TAB-EBELN.
**IF SY-SUBRC = 0.
o OUTPUT-EBELN = EKKO_TAB-EBELN.
o OUTPUT-BSART = EKKO_TAB-BSART.
o OUTPUT-LIFNR = EKKO_TAB-LIFNR.
o OUTPUT-BEDAT = EKKO_TAB-BEDAT.
OUTPUT-PMENGE = EKPO_TAB-MENGE.
OUTPUT-MATNR = EKPO_TAB-MATNR.
OUTPUT-MBLNR = MSEG_TAB-MBLNR.
OUTPUT-GMENGE = MSEG_TAB-MENGE.
o OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.
o OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.
modify OUTPUT transporting pmenge matnr MBLNR GMENGE.
**APPEND OUTPUT.
*ENDIF.
*ENDIF.
*ENDLOOP.
LOOP AT EKKO_TAB.
LOOP AT EKPO_TAB WHERE EBELN = EKKO_TAB-EBELN.
LOOP AT MSEG_TAB WHERE EBELN = OUTPUT-EBELN AND MATNR = output-MATNR AND EBELP = OUTPUT-EBELP.
OUTPUT-EBELN = EKKO_TAB-EBELN.
OUTPUT-BSART = EKKO_TAB-BSART.
OUTPUT-LIFNR = EKKO_TAB-LIFNR.
OUTPUT-BEDAT = EKKO_TAB-BEDAT.
OUTPUT-PMENGE = EKPO_TAB-MENGE.
OUTPUT-MATNR = EKPO_TAB-MATNR.
OUTPUT-EBELP = EKPO_TAB-EBELP.
APPEND OUTPUT.
CLEAR OUTPUT.
ENDLOOP.
ENDLOOP.
*LOOP AT OUTPUT.
*LOOP AT EKPO_TAB WHERE EBELN = OUTPUT-EBELN.
OUTPUT-PMENGE = EKPO_TAB-MENGE.
OUTPUT-MATNR = EKPO_TAB-MATNR.
OUTPUT-EBELP = EKPO_TAB-EBELP.
*MODIFY OUTPUT TRANSPORTING PMENGE MATNR EBELP.
*ENDLOOP.
*ENDLOOP.
LOOP AT OUTPUT.
LOOP AT MSEG_TAB WHERE EBELN = OUTPUT-EBELN AND MATNR = OUTPUT-MATNR AND EBELP = OUTPUT-EBELP.
*LOOP AT QALS_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND MATNR = OUTPUT-MATNR AND EBELN = OUTPUT-EBELN AND EBELP = OUTPUT-EBELP.
OUTPUT-MBLNR = MSEG_TAB-MBLNR.
OUTPUT-GMENGE = MSEG_TAB-MENGE.
OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.
OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.
OUTPUT-EBELP = QALS_TAB-EBELP.
*APPEND OUTPUT.
MODIFY OUTPUT TRANSPORTING MBLNR GMENGE.
*CLEAR OUTPUT.
*CLEAR MSEG_TAB.
ENDLOOP.
ENDLOOP.
*ENDLOOP.
LOOP AT OUTPUT.
LOOP AT QALS_TAB WHERE MBLNR = OUTPUT-MBLNR AND MATNR = OUTPUT-MATNR AND EBELN = OUTPUT-EBELN.
OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.
OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.
OUTPUT-EBELP = QALS_TAB-EBELP.
MODIFY OUTPUT TRANSPORTING LMENGE01 LMENGE07.
ENDLOOP.
ENDLOOP.
LOOP AT OUTPUT.
LOOP AT EBAN_TAB WHERE EBELN = OUTPUT-EBELN.
OUTPUT-BANFN = EBAN_TAB-BANFN.
OUTPUT-BADAT = EBAN_TAB-BADAT.
OUTPUT-RMENGE = EBAN_TAB-MENGE.
OUTPUT-AFNAM = EBAN_TAB-AFNAM.
MODIFY OUTPUT TRANSPORTING BANFN BADAT RMENGE AFNAM.
ENDLOOP.
ENDLOOP.
LOOP AT OUTPUT.
LOOP AT MKPF_TAB WHERE MBLNR = OUTPUT-MBLNR.
OUTPUT-BUDAT = MKPF_TAB-BUDAT.
MODIFY OUTPUT TRANSPORTING BUDAT.
ENDLOOP.
ENDLOOP.
*LOOP AT OUTPUT.
*SELECT SINGLE MATNR FROM EKPO INTO OUTPUT-MATNR WHERE EBELN = OUTPUT-EBELN.
*MODIFY OUTPUT TRANSPORTING MATNR.
*SELECT SINGLE MBLNR FROM MSEG INTO OUTPUT-MBLNR WHERE MATNR = OUTPUT-MATNR.
*MODIFY OUTPUT TRANSPORTING MBLNR.
*ENDLOOP.
LOOP AT OUTPUT.
LOOP AT MAKT_TAB WHERE MATNR = OUTPUT-MATNR.
OUTPUT-MAKTX = MAKT_TAB-MAKTX.
MODIFY OUTPUT TRANSPORTING MAKTX.
ENDLOOP.
ENDLOOP.
*LOOP AT EKKO_TAB.
LOOP AT EKPO_TAB WHERE EBELN = EKKO_TAB-EBELN.
o LOOP AT MSEG_TAB WHERE EBELN = EKPO_TAB-EBELN AND MATNR = EKPO_TAB-MATNR.
o LOOP AT QALS_TAB WHERE MBLNR = MSEG_TAB-MBLNR AND MATNR = MSEG_TAB-MATNR AND EBELN = MSEG_TAB-EBELN.
o LOOP AT MKPF_TAB WHERE MBLNR = MSEG_TAB-MBLNR.
OUTPUT-EBELN = EKKO_TAB-EBELN.
OUTPUT-BSART = EKKO_TAB-BSART.
OUTPUT-LIFNR = EKKO_TAB-LIFNR.
OUTPUT-BEDAT = EKKO_TAB-BEDAT.
OUTPUT-PMENGE = EKPO_TAB-MENGE.
OUTPUT-MATNR = EKPO_TAB-MATNR.
OUTPUT-EBELP = EKPO_TAB-EBELP.
o OUTPUT-MBLNR = MSEG_TAB-MBLNR.
o OUTPUT-GMENGE = MSEG_TAB-MENGE.
o OUTPUT-BUDAT = MKPF_TAB-BUDAT.
o OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.
o OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.
o MODIFY OUTPUT TRANSPORTING BSART LIFNR BEDAT PMENGE MATNR.
APPEND OUTPUT.
CLEAR OUTPUT.
o CLEAR QALS_TAB.
o ENDLOOP.
o CLEAR MKPF_TAB.
o ENDLOOP.
o CLEAR MSEG_TAB.
o ENDLOOP.
CLEAR EKPO_TAB.
ENDLOOP.
CLEAR EKKO_TAB.
ENDLOOP.
**SELECT MBLNR EBELN FROM MSEG INTO TABLE MSEG_TAB1 FOR ALL ENTRIES IN EKKO_TAB WHERE EBELN = EKKO_TAB-EBELN.
o LOOP AT OUTPUT.
o MOVE-CORRESPONDING MSEG_TAB1 TO OUTPUT.
o OUTPUT-MBLNR = MSEG_TAB1-MBLNR.
o MODIFY OUTPUT TRANSPORTING MBLNR.
o ENDLOOP.
*LOOP AT OUTPUT.
LOOP AT MSEG_TAB WHERE EBELN = output-EBELN AND MATNR = output-MATNR AND EBELP = OUTPUT-EBELP.
**READ TABLE MSEG_TAB WITH KEY EBELN = OUTPUT-EBELN MATNR = OUTPUT-MATNR.
*IF SY-SUBRC = 0.
OUTPUT-MBLNR = MSEG_TAB-MBLNR.
OUTPUT-GMENGE = MSEG_TAB-MENGE.
*MODIFY OUTPUT TRANSPORTING MBLNR GMENGE.
*ENDIF.
*clear output.
*ENDLOOP.
*endloop.
*LOOP AT OUTPUT.
READ TABLE QALS_TAB WITH KEY MBLNR = OUTPUT-MBLNR MATNR = OUTPUT-MATNR EBELN = OUTPUT-EBELN.
*IF SY-SUBRC = 0.
*OUTPUT-LMENGE01 = QALS_TAB-LMENGE01.
*OUTPUT-LMENGE07 = QALS_TAB-LMENGE07.
*MODIFY OUTPUT TRANSPORTING LMENGE01 LMENGE07.
*ENDIF.
*ENDLOOP.
LOOP AT OUTPUT.
READ TABLE EBAN_TAB WITH KEY EBELN = OUTPUT-EBELN.
IF SY-SUBRC = 0.
OUTPUT-BANFN = EBAN_TAB-BANFN.
OUTPUT-BADAT = EBAN_TAB-BADAT.
OUTPUT-RMENGE = EBAN_TAB-MENGE.
OUTPUT-AFNAM = EBAN_TAB-AFNAM.
MODIFY OUTPUT TRANSPORTING BANFN BADAT RMENGE AFNAM.
ENDIF.
ENDLOOP.
*LOOP AT OUTPUT.
READ TABLE MKPF_TAB WITH KEY MBLNR = OUTPUT-MBLNR.
IF SY-SUBRC = 0.
OUTPUT-BUDAT = MKPF_TAB-BUDAT.
MODIFY OUTPUT TRANSPORTING BUDAT.
ENDIF.
ENDLOOP.
*LOOP AT OUTPUT.
*READ TABLE MAKT_TAB WITH KEY MATNR = OUTPUT-MATNR.
*IF SY-SUBRC = 0.
*OUTPUT-MAKTX = MAKT_TAB-MAKTX.
*MODIFY OUTPUT TRANSPORTING MAKTX.
*ENDIF.
*ENDLOOP.
PERFORM F_OUTPUT.
PERFORM SORT.
PERFORM GRID.
FORM F_OUTPUT.
F_OUTPUT1-FIELDNAME = 'MATNR'.
F_OUTPUT1-REF_TABNAME = 'EKPO'.
F_OUTPUT1-REF_FIELDNAME = 'MATNR'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME ='MAKTX'.
F_OUTPUT1-SELTEXT_M = 'DESCRIPTION.'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME = 'LIFNR'.
F_OUTPUT1-REF_TABNAME = 'EKKO'.
F_OUTPUT1-REF_FIELDNAME = 'LIFNR'.
F_OUTPUT1-SELTEXT_M = 'SUPPLIER'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME = 'AFNAM'.
F_OUTPUT1-REF_TABNAME = 'EBAN'.
F_OUTPUT1-REF_FIELDNAME = 'AFNAM'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME = 'BANFN'.
F_OUTPUT1-REF_TABNAME = 'EBAN'.
F_OUTPUT1-REF_FIELDNAME = 'BANFN'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME = 'BADAT'.
F_OUTPUT1-SELTEXT_M = 'PRS DATE'.
F_OUTPUT1-REF_TABNAME = 'EBAN'.
F_OUTPUT1-REF_FIELDNAME = 'BADAT'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME ='RMENGE'.
*F_OUTPUT1-REF_TABNAME = 'MSEG'.
*F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.
F_OUTPUT1-SELTEXT_M = 'PRS QTY'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME = 'EBELN'.
F_OUTPUT1-REF_TABNAME = 'EKKO'.
F_OUTPUT1-REF_FIELDNAME = 'EBELN'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME = 'BSART'.
F_OUTPUT1-REF_TABNAME = 'EKKO'.
F_OUTPUT1-REF_FIELDNAME = 'BSART'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME = 'BEDAT'.
F_OUTPUT1-REF_TABNAME = 'EKKO'.
F_OUTPUT1-REF_FIELDNAME = 'BEDAT'.
F_OUTPUT1-SELTEXT_M = 'PO DATE'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME ='PMENGE'.
F_OUTPUT1-SELTEXT_M = 'PO QTY'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME = 'MBLNR'.
F_OUTPUT1-REF_TABNAME = 'MSEG'.
F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.
F_OUTPUT1-SELTEXT_M = 'GR NUMBER'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME ='BUDAT'.
F_OUTPUT1-SELTEXT_M = 'GR DATE'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME ='GMENGE'.
*F_OUTPUT1-REF_TABNAME = 'MSEG'.
*F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.
F_OUTPUT1-SELTEXT_M = 'RECEIVED QTY'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME = 'LMENGE01'.
F_OUTPUT1-REF_TABNAME = 'QALS'.
F_OUTPUT1-REF_FIELDNAME = 'LMENGE01'.
F_OUTPUT1-SELTEXT_M = 'ACCEPTED QTY'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME = 'LMENGE07'.
F_OUTPUT1-REF_TABNAME = 'QALS'.
F_OUTPUT1-REF_FIELDNAME = 'LMENGE07'.
F_OUTPUT1-SELTEXT_M = 'REJECTED QTY'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
F_OUTPUT1-FIELDNAME ='REMARKS'.
**F_OUTPUT1-REF_TABNAME = 'MSEG'.
**F_OUTPUT1-REF_FIELDNAME = 'MBLNR'.
F_OUTPUT1-SELTEXT_M = 'REMARKS'.
APPEND F_OUTPUT1.
CLEAR F_OUTPUT1.
ENDFORM.
FORM SORT.
IT_SORT-FIELDNAME = 'MATNR'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'MAKTX'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'LIFNR'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'AFNAM'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'BANFN'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'BADAT'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'RMENGE'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'EBELN'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'BSART'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'BEDAT'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'PMENGE'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'MBLNR'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'BUDAT'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'GMENGE'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'LMENGE01'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
IT_SORT-FIELDNAME = 'LMENGE07'.
IT_SORT-UP = 'X'.
APPEND IT_SORT.
CLEAR IT_SORT.
ENDFORM.
FORM GRID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = 'REPID'
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = F_OUTPUT1[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = OUTPUT[].
EXCEPTIONS
PROGRAM_ERROR = 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.
ENDFORM.Hi prasad,
Whats the problem exactly. Is it not displaying any records ?
Thanks,
bsv. -
Re: [iPlanet-JATO] Experiencing problem while executing model.
Hi Todd,
Thanks a lot for your input!
In the case , I found that "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is alaised as a
column name in the resultset. So I am using this as a column in Jato
Descriptor for Plan_Dt. Now it is working fine.
Thanks and Regards,
Santa.
----- Original Message -----
From: Todd Fast <toddwork@c...>
Sent: Thursday, July 26, 2001 9:50 AM
Subject: Re: [iPlanet-JATO] Experiencing problem while executing model.
Santa--
I am experiencing a problem while executing a bounded model. I am usingQueryModelBase. Whenever the following query gets executed inonBeforeModel
execute of TiledView, it throws an exception describing "PLAN_DT not found
in ResultSet". If you execute this query on the SQL prompt then we getrows
of data. Please could you tell us how the mapping between model and
resultset works ? And what changes do we have to make to execute thisquery.
>>
SELECT PART_NM,NEWTXTDOLL
TO_CHAR(PLAN_DT, 'MM/DD/YYYY'),
FROM cpsselect
WHERE CHG_DT >= TO_DATE('2001-06-17', 'YYYY-MM-DD')The mapping of result set to model is done via JDBC, using the columnnames
you provide in your model's column descriptors. It sounds as if you are
providing the column name "PLAN_DT" in a descriptor, and when the model
tries to look up that column in the result set, there is no such columnand
the operation fails.
In order to debug this, you should try running your query with a JDBC
connection, not SQL*Plus or your command-line SQL tool. What you need to
find out is how the expresion "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is aliasedas
a column name in the resut set. The easiest way to do this is to write a
simple class that does nothing but use your JDBC driver to connect the
database and execute this query. After execution, use theResultSetMetaData
information to find out the column names for the result set. Then, use
these column names in your JATO column descriptors.
Another Problem:We are not getting the values for NEWTXTDOLL column whenwe try to display it in a Tiled View.
I'm sorry, this isn't enough information for me to offer any suggestions.
Using the technique above, determine which columns are coming back in the
result set, and make sure your display fields in the TiledView are boundto
those column names. The problem could be something as simple as a typo in
the field's bound name, or something more complex like the column in the
result set being named something you don't expect.
Another approach might be to alias the columns yourself using the "AS
<alias>" expression, and assign them names that you choose instead ofusing
the names assigned by the database or JDBC driver.
Todd
[email protected]
The Information contained and transmitted by this E-MAIL is proprietary to
Wipro Limited and is intended for use only by the individual or entity to
which
it is addressed, and may contain information that is privileged, confidential
or
exempt from disclosure under applicable law. If this is a forwarded message,
the content of this E-MAIL may not have been sent with the authority of the
Company. If you are not the intended recipient, an agent of the intended
recipient or a person responsible for delivering the information to the named
recipient, you are notified that any use, distribution, transmission,
printing,
copying or dissemination of this information in any way or in any manner is
strictly prohibited. If you have received this communication in error, please
delete this mail & notify us immediately at mailadmin@w...
[Non-text portions of this message have been removed]Hi Todd,
Thanks a lot for your input!
In the case , I found that "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is alaised as a
column name in the resultset. So I am using this as a column in Jato
Descriptor for Plan_Dt. Now it is working fine.
Thanks and Regards,
Santa.
----- Original Message -----
From: Todd Fast <toddwork@c...>
Sent: Thursday, July 26, 2001 9:50 AM
Subject: Re: [iPlanet-JATO] Experiencing problem while executing model.
Santa--
I am experiencing a problem while executing a bounded model. I am usingQueryModelBase. Whenever the following query gets executed inonBeforeModel
execute of TiledView, it throws an exception describing "PLAN_DT not found
in ResultSet". If you execute this query on the SQL prompt then we getrows
of data. Please could you tell us how the mapping between model and
resultset works ? And what changes do we have to make to execute thisquery.
>>
SELECT PART_NM,NEWTXTDOLL
TO_CHAR(PLAN_DT, 'MM/DD/YYYY'),
FROM cpsselect
WHERE CHG_DT >= TO_DATE('2001-06-17', 'YYYY-MM-DD')The mapping of result set to model is done via JDBC, using the columnnames
you provide in your model's column descriptors. It sounds as if you are
providing the column name "PLAN_DT" in a descriptor, and when the model
tries to look up that column in the result set, there is no such columnand
the operation fails.
In order to debug this, you should try running your query with a JDBC
connection, not SQL*Plus or your command-line SQL tool. What you need to
find out is how the expresion "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is aliasedas
a column name in the resut set. The easiest way to do this is to write a
simple class that does nothing but use your JDBC driver to connect the
database and execute this query. After execution, use theResultSetMetaData
information to find out the column names for the result set. Then, use
these column names in your JATO column descriptors.
Another Problem:We are not getting the values for NEWTXTDOLL column whenwe try to display it in a Tiled View.
I'm sorry, this isn't enough information for me to offer any suggestions.
Using the technique above, determine which columns are coming back in the
result set, and make sure your display fields in the TiledView are boundto
those column names. The problem could be something as simple as a typo in
the field's bound name, or something more complex like the column in the
result set being named something you don't expect.
Another approach might be to alias the columns yourself using the "AS
<alias>" expression, and assign them names that you choose instead ofusing
the names assigned by the database or JDBC driver.
Todd
[email protected]
The Information contained and transmitted by this E-MAIL is proprietary to
Wipro Limited and is intended for use only by the individual or entity to
which
it is addressed, and may contain information that is privileged, confidential
or
exempt from disclosure under applicable law. If this is a forwarded message,
the content of this E-MAIL may not have been sent with the authority of the
Company. If you are not the intended recipient, an agent of the intended
recipient or a person responsible for delivering the information to the named
recipient, you are notified that any use, distribution, transmission,
printing,
copying or dissemination of this information in any way or in any manner is
strictly prohibited. If you have received this communication in error, please
delete this mail & notify us immediately at mailadmin@w...
[Non-text portions of this message have been removed] -
Problem in sending the smartform as an email in a country specific language
Hi,
I am facing a problem in sending a smartform as a email for all other Languages except english and another problem is its sending the email but the output status is still in RED in the messages tab.
the program is working fine for english.
Please do find the below code using which i would be sending the smartform as an email for a PO along with the line item attachments.
Please help.
Arun.
Determine smartform function module for purchase document
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lf_formname
IMPORTING
fm_name = lf_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
error handling
ent_retco = sy-subrc.
IF sy-subrc = 1.
MESSAGE e001(/smb40/ssfcomposer).
ENDIF.
IF sy-subrc = 2.
MESSAGE e002(/smb40/ssfcomposer) WITH tnapr-sform.
ENDIF.
PERFORM protocol_update_i.
ENDIF.
*Start of changes <Arun K Singarapu> C082493 <04/28/2008>
*for print preview
IF sy-ucomm = 'PREVOUTPUT' OR sy-ucomm = 'VIEW'.
CALL FUNCTION lf_fm_name "'/1BCDWB/SF00000197'
EXPORTING
control_parameters = wa_ctrlop
output_options = wa_compop
user_settings = 'X'
is_ekko = l_doc-xekko
is_pekko = l_doc-xpekko
is_nast = l_nast
iv_from_mem = l_from_memory
iv_druvo = iv_druvo
iv_xfz = iv_xfz
IMPORTING
job_output_info = wa_return
TABLES
it_ekpo = l_doc-xekpo[]
it_ekpa = l_doc-xekpa[]
it_pekpo = l_doc-xpekpo[]
it_eket = l_doc-xeket[]
it_tkomv = l_doc-xtkomv[]
it_ekkn = l_doc-xekkn[]
it_ekek = l_doc-xekek[]
it_komk = l_xkomk[]
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.
EXIT.
ELSE.
wa_ctrlop-LANGU = nast-spras.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_compop-tdnoprev = 'X'.
CALL FUNCTION lf_fm_name "'/1BCDWB/SF00000197'
EXPORTING
control_parameters = wa_ctrlop
output_options = wa_compop
user_settings = 'X'
is_ekko = l_doc-xekko
is_pekko = l_doc-xpekko
is_nast = l_nast
iv_from_mem = l_from_memory
iv_druvo = iv_druvo
iv_xfz = iv_xfz
IMPORTING
job_output_info = wa_return
TABLES
it_ekpo = l_doc-xekpo[]
it_ekpa = l_doc-xekpa[]
it_pekpo = l_doc-xpekpo[]
it_eket = l_doc-xeket[]
it_tkomv = l_doc-xtkomv[]
it_ekkn = l_doc-xekkn[]
it_ekek = l_doc-xekek[]
it_komk = l_xkomk[]
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.
*Convert the data from OTF to PDF format
it_otf[] = wa_return-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = l_len_in
bin_file = lp_xcontent
TABLES
otf = it_otf
lines = it_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
TRY.
---------- create persistent send request ----------------------
send_request = cl_bcs=>create_persistent( ).
len = XSTRLEN( lp_xcontent ).
transform to solix tab
lt_solix =
cl_document_bcs=>xstring_to_solix(
ip_xstring = lp_xcontent ).
Create Body to the E-mail.
APPEND Text-005 TO l_text.
Attachment Name
l_ponumber = text-004.
CONCATENATE l_ponumber l_doc-xekko-ebeln INTO l_ponumber.
Subject for the E-Mail.
l_subject = text-001.
CONCATENATE l_subject l_doc-xekko-ebeln INTO l_subject.
*create document E-Mail.
CALL METHOD cl_document_bcs=>create_document
EXPORTING
i_type = 'RAW'
i_subject = l_subject
i_length = '13'
i_text = l_text
RECEIVING
result = l_email_object.
*Create PDF Document
bcs_doc = cl_document_bcs=>create_document(
i_type = 'PDF'
i_subject = l_ponumber
i_length = len
i_language = nast-spras
i_hex = lt_solix
*Type casting
obj_pdf_file ?= bcs_doc.
Add PDF document as an attachment
CALL METHOD l_email_object->add_document_as_attachment
EXPORTING
im_document = obj_pdf_file.
get the attachments of the PO for each line item
SELECT ebeln
ebelp
FROM ekpo
INTO TABLE it_ekpo
WHERE ebeln = l_doc-xekko-ebeln.
concatenate PO and the Line Item Numebr to get the Object key
LOOP AT it_ekpo INTO wa_ekpo.
CONCATENATE wa_ekpo-ebeln wa_ekpo-ebelp INTO wa_temp-objky.
APPEND wa_temp TO it_temp.
CLEAR: wa_temp,wa_ekpo.
ENDLOOP.
*Get data from table DRAD
IF it_temp[] IS NOT INITIAL.
SELECT dokar
doknr
dokvr
doktl
objky
FROM drad
client specified
INTO TABLE it_drad
FOR ALL ENTRIES IN it_temp
WHERE mandt = sy-mandt
AND objky = it_temp-objky.
ENDIF.
IF NOT it_drad IS INITIAL.
SELECT * FROM dms_doc2loio
INTO TABLE it_dms_doc2loio
FOR ALL ENTRIES IN it_drad
WHERE dokar = 'SRM'
AND doknr = it_drad-doknr
AND dokvr = it_drad-dokvr
AND doktl = it_drad-doktl.
ENDIF.
Get the Physical object class and Object ID of the attachment
IF NOT it_dms_doc2loio IS INITIAL.
SELECT * FROM dms_ph_cd1
INTO TABLE it_dms_ph_cd1
FOR ALL ENTRIES IN it_dms_doc2loio
WHERE loio_id = it_dms_doc2loio-lo_objid.
ENDIF.
Get the file from the DMS server using the below function module.
LOOP AT it_dms_ph_cd1 INTO wa_dms_ph_cd1.
wa_object_id-class = wa_dms_ph_cd1-ph_class.
wa_object_id-objid = wa_dms_ph_cd1-phio_id.
CALL FUNCTION 'SDOK_PHIO_LOAD_CONTENT'
EXPORTING
object_id = wa_object_id
client = sy-mandt
TABLES
file_access_info = it_file_access_info
file_content_binary = it_sdokcntbin
EXCEPTIONS
not_existing = 1
not_authorized = 2
no_content = 3
bad_storage_type = 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.
READ TABLE it_file_access_info INTO wa_file_access_info INDEX 1.
IF wa_file_access_info-mimetype = 'application/msword'.
l_doc_type = 'DOC'.
CLEAR: a_xstring,len.
LOOP AT it_sdokcntbin INTO wa_sdokcntbin.
CONCATENATE a_xstring wa_sdokcntbin-line
INTO a_xstring IN BYTE MODE.
ENDLOOP.
len = XSTRLEN( a_xstring ).
transform to solix tab - adding additional attachments
REFRESH lt_solix.
lt_solix =
cl_document_bcs=>xstring_to_solix(
ip_xstring = a_xstring ).
CLEAR l_filename.
Get the file name
l_filename = wa_file_access_info-file_name.
bcs_doc1 = cl_document_bcs=>create_document(
i_type = l_doc_type
i_subject = l_filename
i_length = len
i_language = sy-langu
i_hex = lt_solix
*Type casting
obj_file ?= bcs_doc1.
Add Attachment as a document to the email object
CALL METHOD l_email_object->add_document_as_attachment
EXPORTING
im_document = obj_file.
for PDF document
ELSEIF wa_file_access_info-mimetype = 'application/pdf'.
l_doc_type = 'PDF'.
file_size = wa_file_access_info-file_size.
Convert the 1022 binary data to xstring
CLEAR a_xstring.
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = file_size
IMPORTING
buffer = a_xstring
TABLES
binary_tab = it_sdokcntbin
EXCEPTIONS
failed = 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.
DATA: w_output_length TYPE i.
Convert Xstring to 255 RAW
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = a_xstring
IMPORTING
output_length = w_output_length
TABLES
binary_tab = lt_content_bin.
len = w_output_length.
CLEAR l_filename.
Get the file name
l_filename = wa_file_access_info-file_name.
bcs_doc1 = cl_document_bcs=>create_document(
i_type = l_doc_type
i_subject = l_filename
i_length = len
i_language = sy-langu
i_hex = lt_content_bin
type casting
obj_file ?= bcs_doc1.
Add Attachment as a document to the email object
CALL METHOD l_email_object->add_document_as_attachment
EXPORTING
im_document = obj_file.
for Excel Document
ELSEIF wa_file_access_info-mimetype = 'application/msexcel'.
l_doc_type = 'XLS'.
CLEAR: a_xstring,len.
LOOP AT it_sdokcntbin INTO wa_sdokcntbin.
CONCATENATE a_xstring wa_sdokcntbin-line
INTO a_xstring IN BYTE MODE.
ENDLOOP.
len = XSTRLEN( a_xstring ).
transform to solix tab - adding additional attachments
REFRESH lt_solix.
lt_solix =
cl_document_bcs=>xstring_to_solix(
ip_xstring = a_xstring ).
CLEAR l_filename.
Get the file name
l_filename = wa_file_access_info-file_name.
bcs_doc1 = cl_document_bcs=>create_document(
i_type = l_doc_type
i_subject = l_filename
i_length = len
i_language = sy-langu
i_hex = lt_solix
*Type casting
obj_file ?= bcs_doc1.
Add Attachment as a document to the email object
CALL METHOD l_email_object->add_document_as_attachment
EXPORTING
im_document = obj_file.
for text doxument
ELSEIF wa_file_access_info-mimetype = 'plain/text'.
l_doc_type = 'TXT'.
file_size = wa_file_access_info-file_size.
Get the file name
l_filename = wa_file_access_info-file_name.
CALL FUNCTION 'SCMS_BINARY_TO_TEXT'
EXPORTING
input_length = file_size
TABLES
binary_tab = it_sdokcntbin
text_tab = file_data
EXCEPTIONS
failed = 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.
CALL METHOD cl_document_bcs=>create_document
EXPORTING
i_type = l_doc_type
i_subject = l_filename
i_text = file_data
RECEIVING
result = bcs_doc1.
obj_file ?= bcs_doc1.
Add Attachment as a document to the email object
CALL METHOD l_email_object->add_document_as_attachment
EXPORTING
im_document = obj_file.
ENDIF.
CLEAR:it_file_access_info,it_sdokcntbin.
CLEAR:wa_object_id,wa_file_access_info,file_size.
ENDLOOP.
CALL METHOD send_request->set_document( l_email_object ).
*Get the address number for the vendor
SELECT SINGLE adrnr
FROM lfa1
INTO l_adrnr
WHERE lifnr = l_doc-xekko-lifnr.
MOVE l_adrnr TO l_addrno.
Get the Email Address for the vendor using address number
CALL FUNCTION 'ADDR_GET_REMOTE'
EXPORTING
addrnumber = l_addrno
TABLES
adsmtp = it_adsmtp
EXCEPTIONS
parameter_error = 1
address_not_exist = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
sender = cl_sapuser_bcs=>create( sy-uname ).
CALL METHOD send_request->set_sender
EXPORTING
i_sender = sender.
READ TABLE it_adsmtp INTO wa_adsmtp WITH KEY flg_nouse = 'X'.
IF sy-subrc = 0.
LOOP AT it_adsmtp INTO wa_adsmtp WHERE flg_nouse = 'X'.
CALL METHOD cl_cam_address_bcs=>create_internet_address
EXPORTING
i_address_string = wa_adsmtp-smtp_addr
RECEIVING
result = recipient.
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient
i_express = 'X'.
ENDLOOP.
ELSE.
READ TABLE it_adsmtp INTO wa_adsmtp WITH KEY flgdefault = 'X'.
IF sy-subrc = 0.
CALL METHOD cl_cam_address_bcs=>create_internet_address
EXPORTING
i_address_string = wa_adsmtp-smtp_addr
RECEIVING
result = recipient.
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient
i_express = 'X'.
ENDIF.
ENDIF.
CALL METHOD send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = l_sent_to_all ).
CATCH cx_bcs INTO bcs_exception.
WRITE: 'Fehler aufgetreten.'(001).
WRITE: 'Fehlertyp:'(002), bcs_exception->error_type.
EXIT.
ENDTRY.
ENDIF.Hi,
I am facing a problem in sending a smartform as a email for all other Languages except english and another problem is its sending the email but the output status is still in RED in the messages tab.
the program is working fine for english.
Please do find the below code using which i would be sending the smartform as an email for a PO along with the line item attachments.
Please help.
Arun.
Determine smartform function module for purchase document
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lf_formname
IMPORTING
fm_name = lf_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
error handling
ent_retco = sy-subrc.
IF sy-subrc = 1.
MESSAGE e001(/smb40/ssfcomposer).
ENDIF.
IF sy-subrc = 2.
MESSAGE e002(/smb40/ssfcomposer) WITH tnapr-sform.
ENDIF.
PERFORM protocol_update_i.
ENDIF.
*Start of changes <Arun K Singarapu> C082493 <04/28/2008>
*for print preview
IF sy-ucomm = 'PREVOUTPUT' OR sy-ucomm = 'VIEW'.
CALL FUNCTION lf_fm_name "'/1BCDWB/SF00000197'
EXPORTING
control_parameters = wa_ctrlop
output_options = wa_compop
user_settings = 'X'
is_ekko = l_doc-xekko
is_pekko = l_doc-xpekko
is_nast = l_nast
iv_from_mem = l_from_memory
iv_druvo = iv_druvo
iv_xfz = iv_xfz
IMPORTING
job_output_info = wa_return
TABLES
it_ekpo = l_doc-xekpo[]
it_ekpa = l_doc-xekpa[]
it_pekpo = l_doc-xpekpo[]
it_eket = l_doc-xeket[]
it_tkomv = l_doc-xtkomv[]
it_ekkn = l_doc-xekkn[]
it_ekek = l_doc-xekek[]
it_komk = l_xkomk[]
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.
EXIT.
ELSE.
wa_ctrlop-LANGU = nast-spras.
wa_ctrlop-getotf = 'X'.
wa_ctrlop-no_dialog = 'X'.
wa_compop-tdnoprev = 'X'.
CALL FUNCTION lf_fm_name "'/1BCDWB/SF00000197'
EXPORTING
control_parameters = wa_ctrlop
output_options = wa_compop
user_settings = 'X'
is_ekko = l_doc-xekko
is_pekko = l_doc-xpekko
is_nast = l_nast
iv_from_mem = l_from_memory
iv_druvo = iv_druvo
iv_xfz = iv_xfz
IMPORTING
job_output_info = wa_return
TABLES
it_ekpo = l_doc-xekpo[]
it_ekpa = l_doc-xekpa[]
it_pekpo = l_doc-xpekpo[]
it_eket = l_doc-xeket[]
it_tkomv = l_doc-xtkomv[]
it_ekkn = l_doc-xekkn[]
it_ekek = l_doc-xekek[]
it_komk = l_xkomk[]
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.
*Convert the data from OTF to PDF format
it_otf[] = wa_return-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = l_len_in
bin_file = lp_xcontent
TABLES
otf = it_otf
lines = it_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
TRY.
---------- create persistent send request ----------------------
send_request = cl_bcs=>create_persistent( ).
len = XSTRLEN( lp_xcontent ).
transform to solix tab
lt_solix =
cl_document_bcs=>xstring_to_solix(
ip_xstring = lp_xcontent ).
Create Body to the E-mail.
APPEND Text-005 TO l_text.
Attachment Name
l_ponumber = text-004.
CONCATENATE l_ponumber l_doc-xekko-ebeln INTO l_ponumber.
Subject for the E-Mail.
l_subject = text-001.
CONCATENATE l_subject l_doc-xekko-ebeln INTO l_subject.
*create document E-Mail.
CALL METHOD cl_document_bcs=>create_document
EXPORTING
i_type = 'RAW'
i_subject = l_subject
i_length = '13'
i_text = l_text
RECEIVING
result = l_email_object.
*Create PDF Document
bcs_doc = cl_document_bcs=>create_document(
i_type = 'PDF'
i_subject = l_ponumber
i_length = len
i_language = nast-spras
i_hex = lt_solix
*Type casting
obj_pdf_file ?= bcs_doc.
Add PDF document as an attachment
CALL METHOD l_email_object->add_document_as_attachment
EXPORTING
im_document = obj_pdf_file.
get the attachments of the PO for each line item
SELECT ebeln
ebelp
FROM ekpo
INTO TABLE it_ekpo
WHERE ebeln = l_doc-xekko-ebeln.
concatenate PO and the Line Item Numebr to get the Object key
LOOP AT it_ekpo INTO wa_ekpo.
CONCATENATE wa_ekpo-ebeln wa_ekpo-ebelp INTO wa_temp-objky.
APPEND wa_temp TO it_temp.
CLEAR: wa_temp,wa_ekpo.
ENDLOOP.
*Get data from table DRAD
IF it_temp[] IS NOT INITIAL.
SELECT dokar
doknr
dokvr
doktl
objky
FROM drad
client specified
INTO TABLE it_drad
FOR ALL ENTRIES IN it_temp
WHERE mandt = sy-mandt
AND objky = it_temp-objky.
ENDIF.
IF NOT it_drad IS INITIAL.
SELECT * FROM dms_doc2loio
INTO TABLE it_dms_doc2loio
FOR ALL ENTRIES IN it_drad
WHERE dokar = 'SRM'
AND doknr = it_drad-doknr
AND dokvr = it_drad-dokvr
AND doktl = it_drad-doktl.
ENDIF.
Get the Physical object class and Object ID of the attachment
IF NOT it_dms_doc2loio IS INITIAL.
SELECT * FROM dms_ph_cd1
INTO TABLE it_dms_ph_cd1
FOR ALL ENTRIES IN it_dms_doc2loio
WHERE loio_id = it_dms_doc2loio-lo_objid.
ENDIF.
Get the file from the DMS server using the below function module.
LOOP AT it_dms_ph_cd1 INTO wa_dms_ph_cd1.
wa_object_id-class = wa_dms_ph_cd1-ph_class.
wa_object_id-objid = wa_dms_ph_cd1-phio_id.
CALL FUNCTION 'SDOK_PHIO_LOAD_CONTENT'
EXPORTING
object_id = wa_object_id
client = sy-mandt
TABLES
file_access_info = it_file_access_info
file_content_binary = it_sdokcntbin
EXCEPTIONS
not_existing = 1
not_authorized = 2
no_content = 3
bad_storage_type = 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.
READ TABLE it_file_access_info INTO wa_file_access_info INDEX 1.
IF wa_file_access_info-mimetype = 'application/msword'.
l_doc_type = 'DOC'.
CLEAR: a_xstring,len.
LOOP AT it_sdokcntbin INTO wa_sdokcntbin.
CONCATENATE a_xstring wa_sdokcntbin-line
INTO a_xstring IN BYTE MODE.
ENDLOOP.
len = XSTRLEN( a_xstring ).
transform to solix tab - adding additional attachments
REFRESH lt_solix.
lt_solix =
cl_document_bcs=>xstring_to_solix(
ip_xstring = a_xstring ).
CLEAR l_filename.
Get the file name
l_filename = wa_file_access_info-file_name.
bcs_doc1 = cl_document_bcs=>create_document(
i_type = l_doc_type
i_subject = l_filename
i_length = len
i_language = sy-langu
i_hex = lt_solix
*Type casting
obj_file ?= bcs_doc1.
Add Attachment as a document to the email object
CALL METHOD l_email_object->add_document_as_attachment
EXPORTING
im_document = obj_file.
for PDF document
ELSEIF wa_file_access_info-mimetype = 'application/pdf'.
l_doc_type = 'PDF'.
file_size = wa_file_access_info-file_size.
Convert the 1022 binary data to xstring
CLEAR a_xstring.
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = file_size
IMPORTING
buffer = a_xstring
TABLES
binary_tab = it_sdokcntbin
EXCEPTIONS
failed = 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.
DATA: w_output_length TYPE i.
Convert Xstring to 255 RAW
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = a_xstring
IMPORTING
output_length = w_output_length
TABLES
binary_tab = lt_content_bin.
len = w_output_length.
CLEAR l_filename.
Get the file name
l_filename = wa_file_access_info-file_name.
bcs_doc1 = cl_document_bcs=>create_document(
i_type = l_doc_type
i_subject = l_filename
i_length = len
i_language = sy-langu
i_hex = lt_content_bin
type casting
obj_file ?= bcs_doc1.
Add Attachment as a document to the email object
CALL METHOD l_email_object->add_document_as_attachment
EXPORTING
im_document = obj_file.
for Excel Document
ELSEIF wa_file_access_info-mimetype = 'application/msexcel'.
l_doc_type = 'XLS'.
CLEAR: a_xstring,len.
LOOP AT it_sdokcntbin INTO wa_sdokcntbin.
CONCATENATE a_xstring wa_sdokcntbin-line
INTO a_xstring IN BYTE MODE.
ENDLOOP.
len = XSTRLEN( a_xstring ).
transform to solix tab - adding additional attachments
REFRESH lt_solix.
lt_solix =
cl_document_bcs=>xstring_to_solix(
ip_xstring = a_xstring ).
CLEAR l_filename.
Get the file name
l_filename = wa_file_access_info-file_name.
bcs_doc1 = cl_document_bcs=>create_document(
i_type = l_doc_type
i_subject = l_filename
i_length = len
i_language = sy-langu
i_hex = lt_solix
*Type casting
obj_file ?= bcs_doc1.
Add Attachment as a document to the email object
CALL METHOD l_email_object->add_document_as_attachment
EXPORTING
im_document = obj_file.
for text doxument
ELSEIF wa_file_access_info-mimetype = 'plain/text'.
l_doc_type = 'TXT'.
file_size = wa_file_access_info-file_size.
Get the file name
l_filename = wa_file_access_info-file_name.
CALL FUNCTION 'SCMS_BINARY_TO_TEXT'
EXPORTING
input_length = file_size
TABLES
binary_tab = it_sdokcntbin
text_tab = file_data
EXCEPTIONS
failed = 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.
CALL METHOD cl_document_bcs=>create_document
EXPORTING
i_type = l_doc_type
i_subject = l_filename
i_text = file_data
RECEIVING
result = bcs_doc1.
obj_file ?= bcs_doc1.
Add Attachment as a document to the email object
CALL METHOD l_email_object->add_document_as_attachment
EXPORTING
im_document = obj_file.
ENDIF.
CLEAR:it_file_access_info,it_sdokcntbin.
CLEAR:wa_object_id,wa_file_access_info,file_size.
ENDLOOP.
CALL METHOD send_request->set_document( l_email_object ).
*Get the address number for the vendor
SELECT SINGLE adrnr
FROM lfa1
INTO l_adrnr
WHERE lifnr = l_doc-xekko-lifnr.
MOVE l_adrnr TO l_addrno.
Get the Email Address for the vendor using address number
CALL FUNCTION 'ADDR_GET_REMOTE'
EXPORTING
addrnumber = l_addrno
TABLES
adsmtp = it_adsmtp
EXCEPTIONS
parameter_error = 1
address_not_exist = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
sender = cl_sapuser_bcs=>create( sy-uname ).
CALL METHOD send_request->set_sender
EXPORTING
i_sender = sender.
READ TABLE it_adsmtp INTO wa_adsmtp WITH KEY flg_nouse = 'X'.
IF sy-subrc = 0.
LOOP AT it_adsmtp INTO wa_adsmtp WHERE flg_nouse = 'X'.
CALL METHOD cl_cam_address_bcs=>create_internet_address
EXPORTING
i_address_string = wa_adsmtp-smtp_addr
RECEIVING
result = recipient.
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient
i_express = 'X'.
ENDLOOP.
ELSE.
READ TABLE it_adsmtp INTO wa_adsmtp WITH KEY flgdefault = 'X'.
IF sy-subrc = 0.
CALL METHOD cl_cam_address_bcs=>create_internet_address
EXPORTING
i_address_string = wa_adsmtp-smtp_addr
RECEIVING
result = recipient.
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient
i_express = 'X'.
ENDIF.
ENDIF.
CALL METHOD send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = l_sent_to_all ).
CATCH cx_bcs INTO bcs_exception.
WRITE: 'Fehler aufgetreten.'(001).
WRITE: 'Fehlertyp:'(002), bcs_exception->error_type.
EXIT.
ENDTRY.
ENDIF. -
Problem While Executing T.CODE DP90
Hi,
We have Upgrade our system from 4.6C to ECC6.
We are facing following problem while executing Resource Related Billing request
Through Transaction code DP90.
Process.
1. We are creating Sales Order and system will create Service order automatically as per the configuration.
2. In service order we have External as well internal operations ,
Internal operations will be confirmed through IW41, and External Operations we are creating Purchase Requisition then creating PO and MIRO,
After all Operations confirmed we will make Service order status as technically completed, then we are executing DP90 for Resource Related Billing, System will determine the material, combination of Cost element and Activity Type (Which is configured in T.Code ODP1) For External Operations System is Considering Activity Type for material determination in 4.6c but it is not considering Activity Type for Material Determination in ECC6 for External Operations.
Please Help me,
Edited by: D B on Apr 29, 2008 6:13 PMHi Prashanth,
Thanks for your reply, but all activity are valid in current period, in our Scenario in the old system for External Operations with combination of Activity type and Cost element system is determining material but where as in the new system for external operations it is not considering the Activity type and system is determining the material in the combination of Cost element and Blank activity type so, we are getting different material in DP90. -
Problem in executing the adobe form
Hi,
Using the SFP tcode i have createda an interface and a form for that interface.
i have to import parameters from vbap table which i have mapped in the form..there is no problem while executing and activating the form...
but while i am executing the form after passing the values i am getting an exception : SYSTEM ERROR
Meassage ID: FPRUNX
ADS: SOAP Runtime Exception: CSoap Exception Transport.
Are the forms craeted using SFP tcode are Standalone forms i.e. non-interactive forms?Hi friend,
Its not like that the Adobe created using SFP is non interactive.
We can create interactive forms using SFP transaction using java code.
I think it will be the problem with ADS just check with your basis people i think they will configure you the settings which works fine.
To check whether the settings are perfect you can try executing the standard programs FP_TEST_00 and
FP_PDF_TEST_00. If it works fine then some other problem exists else check with your basis team.
Just check this and revert me if you have any issues. I will help you
Thanks,
Sri Hari -
Problem in executing JFCunit test case
Hi all,
I have problem in executing a simple test case that checks for input blank fields entered.
Below is the code for the test class that i am trying to run, but i am unable to execute it. Please can anyone try to resolve this.
package unittest.com.erp;
import junit.extensions.TestSetup;
import junit.extensions.jfcunit.*;
import junit.extensions.jfcunit.finder.*;
import junit.extensions.jfcunit.eventdata.*;
import junit.framework.Test;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
import com.erp.client.swing.ClientLoginDialog;
import com.erp.client.swing.workspace.ClientWorkspaceFrame;
import com.erp.client.swing.workspace.data.LoginResults;
import javax.swing.*;
public class LoginScreenTest
extends JFCTestCase {
private ClientLoginDialog loginScreen = null;
private JButton login = null;
private JButton cancel = null;
private JTextField username = null;
private JTextField password = null;
private JFCTestHelper helper = null;
LoginResults loginSuccess = null;
ClientWorkspaceFrame workspaceFrame = null;
public LoginScreenTest() {
public LoginScreenTest(String name) {
super(name);
public static Test suite() {
return new StartApp(new TestSuite(LoginScreenTest.class));
private static class StartApp
extends TestSetup {
* Construct the test decorator, which starts the application *
* @param test
* Test case.
public StartApp(final Test test) {
super(test);
* Start the LoginScreenTestapplication.
public void setUp() {
new Thread(new Runnable() {
public void run() {
try {
new LoginScreenTest().setUp();
} catch (Exception e) {
}).start();
try {
Thread.currentThread().sleep(10000);
} catch (InterruptedException ex) {
* Tear down the LoginScreenTest application.
public void tearDown() {
protected void setUp()
throws Exception {
super.setUp(); // Choose the text Helper
setHelper(new JFCTestHelper()); // Uses the AWT Event Queue.
// setHelper( new RobotTestHelper( ) ); // Uses the OS Event Queue.
ClientWorkspaceFrame workspaceFrame = ClientWorkspaceFrame.getHandle();
// loginScreen = new ClientLoginDialog( "LoginScreenTest: " + getName());
loginSuccess = ClientLoginDialog.login();
loginScreen = ClientLoginDialog.login(new JFrame(), true);
if (loginSuccess != null && loginSuccess.isSuccess()) {
workspaceFrame.initFrame();
workspaceFrame.loggedInUser = loginSuccess.getName();
workspaceFrame.loggedInFullUserName = loginSuccess.getFullLoginUserName();
workspaceFrame.loggedInUserPassword = loginSuccess.getPassword();
workspaceFrame.setVisible(true);
workspaceFrame.validate();
flushAWT();
protected void tearDown()
throws Exception {
login = null;
cancel = null;
username = null;
password = null;
loginScreen = null;
flushAWT();
// getHelper.cleanUp( this );
super.tearDown();
public void testInitialState() {
NamedComponentFinder finder = new NamedComponentFinder(JButton.class, "Cancel");
finder.setName("Cancel");
JButton exitButton = (JButton) finder.find(loginScreen, 0);
assertNotNull("Could not find the Exit button", exitButton);
NamedComponentFinder finder1 = new NamedComponentFinder(JButton.class, "Login");
finder1.setName("Login");
JButton enterButton = (JButton) finder1.find(loginScreen, 0);
assertNotNull("Could not find the Enter button", enterButton);
getHelper().enterClickAndLeave(new MouseEventData(this, enterButton));
assertEquals("", workspaceFrame.loggedInUser);
assertEquals("", workspaceFrame.loggedInUserPassword);
public static void main(final String[] args) {
TestRunner.run(LoginScreenTest.suite());
Thanks & Regards,
VishalMessage was edited by:
vishal_vj
Message was edited by:
vishal_vj
Message was edited by:
vishal_vj
Message was edited by:
vishal_vjhi All,
can any one guide me how to run the test casese in JFCunit ? as when i tried to run thru command prompt its not recognising the main class at all.
Now i m trying with eclipse problem here is that it is showing error to this line of code
DialogFinder dFinder = new DialogFinder(loginScreen);
error is constructor is undefined?
So looking for some solution.
with regards
kin -
Problem in executing a javascript link on a jsp page
I am having a problem in executing a javascript function from a link. For example if i click some link let say Discover and behind the scene some applet method is supposed to be called, but it is not called? However the the function name comes in the url area (address bar of internet explorer) like javascript:document.switchApplet.discover()
Can anybody help me solving this problem?
Moreover, just for a hint, i think i have deleted some registery value of such time so that's why it is not working. But i am not sure.what is d error u r getting ???
Is it java script error? yes then u can find the line no.
view the source code or ur page and find whether ur .js is including properly or not? means whether the path is correct ? -
Hi all,
I am getting an error I can't solve until now.. Who can help?
The Default Trace in the EP 7.0/NWA gives the following information:
Severity: Error
Message: Problem in executing function module:[date]:com.sap.mw.jco.JCO$AbapException: (126) ERROR_IN_PDO: ERROR_IN_PDO
Category: /uwl/service
Location: com.sap.netweaver.bc.uwl.core.connect.abap.FunctionModuleActionHandler
Application: sap.com/tcwddispwda
The UWL connection tests are correct! So, who can help!
There is nothing to find in sap notes or sdn forum
Best regards,
G. LeursHi john,
I am also facing hte same issue.
when the user is trying to approve the Compleated shopping cart from the button availble in the UWL preview , I am getting the below error.
Exception type:com.sap.netweaver.bc.uwl.connect.ConnectorException Message:Wed Aug 25 12:16:52 CEST 2010 (Connector) :com.sap.netweaver.bc.uwl.connect.ConnectorException:Wed Aug 25 12:16:52 CEST 2010 (Connector) :com.sap.mw.jco.JCO$AbapException:ERROR_IN_PDO
we are not passing any ABAP role from teh SRM system.
it would be great if you can share your views regarding this.
Raji -
Expdp problem when executing from pl/sql transportable tablespaces
Hello
i have a very strange problem for which your assistance is really appreciated. i am applying the transportable tablespaces approach and i have a problem when executing expdp from commandline in comparison to the procedure generated to make the exact same thing.
more precisely when running:
expdp etl/etl dumpfile=TBSP090609_DMP.dmp logfile=TBSP090609_DMP.log directory=EXPDP transport_tablespaces=TBSP090609 transport_full_check=y
the dmp file produced is over 200MB.
when runng the below pl/sql code the volume produced is around 50MB. any idea what i am missing?
job_handle :=
dbms_datapump.OPEN (operation => 'EXPORT',
job_mode => 'TRANSPORTABLE',
job_name => 'export_tablespace',
VERSION => 'COMPATIBLE'
dbms_datapump.add_file (handle => job_handle,
filename => dump_file_name,
DIRECTORY => export_dir_name
dbms_datapump.set_parameter (handle => job_handle,
NAME => 'TTS_FULL_CHECK',
VALUE => 1
dbms_datapump.metadata_filter (handle => job_handle,
NAME => 'TABLESPACE_LIST',
VALUE => '('''
|| tablespace_name
|| ''')'
dbms_datapump.start_job (job_handle);thanx you for your response. the problem was eventually managed to be resolved as follows:
job_handle :=
dbms_datapump.OPEN (operation => 'EXPORT',
job_mode => 'TRANSPORTABLE',
job_name => 'export_tablespace',
VERSION => 'COMPATIBLE'
dbms_datapump.add_file (handle => job_handle,
filename => dump_file_name,
DIRECTORY => export_dir_name
dbms_datapump.set_parameter (handle => job_handle,
NAME => 'TTS_FULL_CHECK',
VALUE => 1
dbms_datapump.metadata_filter (handle => job_handle,
NAME => 'TABLESPACE_EXPR',
VALUE => 'IN('''
|| tablespace_name
|| ''')');
dbms_datapump.start_job (job_handle); -
Facing Problem while executing a command through WLST
Hi,
Iam using Weblogic 11g(10.3.2).Whenever I execute the below command in WLST on windows it is working fine.
reassociateSecurityStore(domain="base_domain",admin="cn=orcladmin",password="welcome1",ldapurl="ldap://<hostname>:389",servertype="OID",jpsroot="cn=jpsroot_idm_idmhost1")
But whenever i execute the same in Linux,it is throwing the error as below:
wls:/base_domain/serverConfig> reassociateSecurityStore(domain="base_domain",admin="cn=orcladmin",password="welcome1",ldapurl="ldap://<hoistname>:389",servertype="OID",jpsroot="cn=jpsroot_idm_idm1")
Traceback (innermost last):
File "<console>", line 1, in ?
NameError: reassociateSecurityStore
Please suggest....
Regards
PavanFacing Problem while executing a command through WLST
-
Problem while executing the transaction code FMBV (Reconstruct)
We are facing a problem while executing the transaction code FMBV
(Reconstruct Availability Control in Funds Management) in it when we
execute this transaction system only updates the expenditure which is
made before technical upgrade from 4.6c to ECC6 EHP6, against the
Assigned Budget (KBFC budget type) in the Annual Budget Table (BPJA)
and
the expenditure which we made after the upgrade, the program just
ignore
it. We can also see the expenditure in the standard FBL3N report.
Please guide us.
Thanks and Best Regards,Dear Abrar
In your description, you refer to missing update after an upgrade. First of all, see if table FMIT is consistent, as it is the basis for calculating the assigned values during AVC reconstruction.
Refer to this note:
977016 FMIT: Missing totals records in Funds Management And perform following steps:
1.- Run program RGZZGLUX
2.- Run program RFFMRC04 to match totals table with line items. A test run after a successful effective run should not find inconsistencies.
3.- If RFFMRC04 does not show more inconsistencies, run FMBV as final step.
Note that this reconstruction must be done without any other budgeting/posting activities at the same time, otherwise you may cause other inconsistencies.
Please let me know the results.
Best regards,
977016 - FMIT: Missing totals records in Funds Management
Symptom
After the upgrade to ERP 2004 or higher you realize that the FMIT totals table is no longer updated in Funds Management. You start the RFFMRC04 report to reconstruct the totals, but the report still displays the missing totals after an update run.
Other Terms
FMIT, EA-PS, ECC 5.00, ECC 6.00, ECC 7.00
Reason and Prerequisites
This problem occurs due to a generation error.
Solution
Start the RGZZGLUX report to generate missing source code in FI-SL. Then start the RFFMRC04 report to reconstruct the totals, now another run of the report should no longer display any errors.
Maybe you are looking for
-
BI related Knowledge management question
Hi Gurus, i am a BI consultat, new to knowledge management, I need some documents trlated to below mentioned topics *Content Management* Using KM as repository for Queries,(web and Excel), Workbooks, Web Templates. Publishing background report output
-
How to avoid QM status for a newly created ODS Request be a Warning
Hi Experts, I AM using 3.5 When I Execute my infopackage lo load a complete load data for an ODS, the QM status of the Request is a warning. The monitor says no problem or warn for the load. I can manually turn it into green and activate the data bu
-
Coding a PDF to so distributors can swap out with their info
we have created out catalog in Quark and used the plug-in X-cat to link to our price data base which allows us to make price chang es with the click up a button. We then prepare PDFs and upload the catalog to our website. We would like to offer our d
-
External Hard Drives... Internally?
Hey guys, I need an external drive for editing with Final Cut Pro (it works much better than capturing video on an internal). So I was wondering, before I ask it on the FCP fora, can Finder/FCP see a second internal HD as an external, and treat it li
-
i had synced all my tunes onto my new ipod classic, when i tried to sync further tunes a few days later i am told `appears to be corrupted´ also ùnknown error 1439´ i am being told, i have only purchased my new ipod 2 months ago, i have downloaded t