No xauth data, using fake authentication data for X11 forwarding
I'm trying to open an X Windows session via Reflection X (version 13.0.2) using secure shell to a Solaris 10 server. I'm asked for the host key authentication and my password but it then hangs. I get the following warning just before the reflectionX sessions hangs:-
Warning: No xauth data, using fake authentication data for X11 forwarding.
Does anyone have any clues to what may be wrong. If I use telnet via reflectionX the X Window works fine.
I still get:
Warning: No xauth data; using fake authentication data for X11 forwarding.
Anyway I don't want to circumvent the problem but to solve it.
Similar Messages
-
How to use an authenticated user for a proxy call
Dear all,
I am currently working on a JEE application where the user needs to authenticate (for this I have configured the web.xml).
Now inside this application I need to do a proxy call to a PI webservice.
I would like to use the user credentials of the already logged in user in order to call the proxy.
What I don't want to do is to use a service user for the proxy call.
The code I am trying to call looks something like this:
private IntegratedConfigurationIn getPort() throws Exception{
IntegratedConfigurationIn port = null;
try {
IntegratedConfigurationInService service = null;
service = new IntegratedConfigurationInService();
port = (IntegratedConfigurationIn) service.getIntegratedConfigurationIn_Port();
BindingProvider bp = (BindingProvider)port;
bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, user);
bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);
if (url.length() != 0)
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);
catch (Exception ex){
ex.printStackTrace();
return port;
The examples I found to retrieve the userdata pointed to codes similar to this one:
public HttpServletRequest getHttpRequest() throws Exception {
// Get runtime context
Properties props = new Properties();
props.put("domain", "true");
Context initialContext = new InitialContext(props);
ApplicationWebServiceContext wsContext = (ApplicationWebServiceContext) initialContext
.lookup(" /wsContext/ApplicationWebServiceContext");
HttpServletRequest req = wsContext.getHttpServletRequest();
return req;
com.sap.security.api.IUser sapUser = com.sap.security.api.UMFactory.getAuthenticator().getLoggedInUser(getHttpRequest(), null);
IUser ep5User = com.sapportals.wcm.util.usermanagement.WPUMFactory.getUserFactory().getEP5User(sapUser);
Now I don't know how to bring it togehter and how to use an authenticated user for the BindingProvider.
I would appreciate any hints or ideas.Peter,
from the first screenshot, what I understood is that, you are calling an inbound PI web service that is intended to create an integrated configuration object (this is used for whole lot of other reason completely) but not actually calling a development web service.
For this, you would have to generate your client classes from the WSDL provided by the PI developer for that particular service. Once you get those client classes generated, you could used the method provided in the other screenshot to extract the user and password and call the intended web service.
Vijay Konam -
How to Sort JTable data using Multiple fields (Date, time and string)
I have to fill the JTable data with some date, time and string values. for example my table data looks like this:
"1998/12/14","15:14:38","Unicorn1","row1"
"1998/12/14","15:14:39","Unicorn2","row2"
"1998/12/14","15:14:40","Unicorn4","row3"
"1998/12/17","12:14:12","Unicorn4","row6"
Now the Sorted Table should be in the following way:
"1998/12/17","12:14:12","Unicorn4","row6"
"1998/12/14","15:14:40","Unicorn4","row3"
"1998/12/14","15:14:39","Unicorn2","row2"
"1998/12/14","15:14:38","Unicorn1","row1"
ie First Date field should be sorted, if 2 date fields are same then sort based on time. if date and time fields are same then need to be sorted on String field.
So if any one worked on this please throw some light on how to proceed. I know how to sort based on single column.
But now i need to sort on multiple columns.So what is code change in the Comparater class.
Thanks in advance.. This is urgent....I think your Schedule objects should implement Comparable. Then you can sort your linked list using the Collections.sort() method without passing in a Comparator.class Schedule(Date date, String class) implements Comparable
public void compareTo(Object obj)
Schedule other = (Schedule)obj;
return date.getTime() - other.getDate().getTime();
} -
How to create a report with data using the Crystal Reports for Java SDK
Hi,
How do I create a report with data that can be displayed via the Crystal Report for Java SDK and the Viewers API?
I am writing my own report designer, and would like to use the Crystal Runtime Engine to display my report in DHTML, PDF, and Excel formats. I can create my own report through the following code snippet:
ReportClientDocument boReportClientDocument = new ReportClientDocument();
boReportClientDocument.newDocument();
However, I cannot find a way to add data elements to the report without specifying an RPT file. Is this possible? I seems like it is since the Eclipse Plug In allows you to specify your database parameters when creating an RPT file.
is there a way to do this through these packages?
com.crystaldecisions.sdk.occa.report.data
com.crystaldecisions.sdk.occa.report.definition
Am I forced to create a RPT file for the different table and column structures I have?
Thank you in advance for any insights.
Ted JenneyHi Rameez,
After working through the example code some more, and doing some more research, I remain unable to populate a report with my own data and view the report in a browser. I realize this is a long post, but there are multiple errors I am receiving, and these are the seemingly essential ones that I am hitting.
Modeling the Sample code from Create_Report_From_Scratch.zip to add a database table, using the following code:
<%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.document.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.definition.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
<%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
<%
try {
ReportClientDocument rcd = new ReportClientDocument();
rcd.newDocument();
// Setup the DB connection
String database_dll = "Sqlsrv32.dll";
String db = "qa_start_2012";
String dsn = "SQL Server";
String userName = "sa";
String pwd = "sa";
// Create the DB connection
ConnectionInfo oConnectionInfo = new ConnectionInfo();
PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();
// Set new table logon properties
PropertyBag oPropertyBag2 = new PropertyBag();
oPropertyBag2.put("DSN", dsn);
oPropertyBag2.put("Data Source", db);
// Set the connection info objects members
// 1. Pass the Logon Properties to the main PropertyBag
// 2. Set the Server Description to the new **System DSN**
oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, oPropertyBag2);
oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, dsn);
oPropertyBag1.put("Database DLL", database_dll);
oConnectionInfo.setAttributes(oPropertyBag1);
oConnectionInfo.setUserName(userName);
oConnectionInfo.setPassword(pwd);
// The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).
oConnectionInfo.setKind(ConnectionInfoKind.CRQE);
// Add a Database table
String tableName = "Building";
Table oTable = new Table();
oTable.setName(tableName);
oTable.setConnectionInfo(oConnectionInfo);
rcd.getDatabaseController().addTable(oTable, null);
catch(ReportSDKException RsdkEx) {
out.println(RsdkEx);
catch (Exception ex) {
out.println(ex);
%>
Throws the exception
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
There was other sample code on SDN which suggested the following - adding the table after calling table.setDataFields() as in:
String tableName = "Building";
String fieldname = "Building_Name";
Table oTable = new Table();
oTable.setName(tableName);
oTable.setAlias(tableName);
oTable.setQualifiedName(tableName);
oTable.setDescription(tableName) ;
Fields fields = new Fields();
DBField field = new DBField();
field.setDescription(fieldname);
field.setHeadingText(fieldname);
field.setName(fieldname);
field.setType(FieldValueType.stringField);
field.setLength(40);
fields.add(field);
oTable.setDataFields(fields);
oTable.setConnectionInfo(oConnectionInfo);
rcd.getDatabaseController().addTable(oTable, null);
This code succeeds, but it is not clear how to add that database field to a section. If I attempt to call the following:
FieldObject oFieldObject = new FieldObject();
oFieldObject.setDataSourceName(field.getFormulaForm());
oFieldObject.setFieldValueType(field.getType());
// Now add it to the section
oFieldObject.setLeft(3120);
oFieldObject.setTop(120);
oFieldObject.setWidth(1911);
oFieldObject.setHeight(226);
rcd.getReportDefController().getReportObjectController().add(oFieldObject, rcd.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0), -1);
Then I get an error (which is not unexpected)
com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The field was not found.---- Error code:-2147213283 Error code name:invalidFieldObject
How do I add one of the table.SetDataFields() to my report to be displayed?
Are there any other pointers or suggestions you may have?
Thank you -
Displaying diff dates using PL/SQL expression for 'display only' item ?
Hi ,
I am having a display only item -- :P2_FROM_Date . If its Thu,Fri,Sat or Sun I want to set the date as the last Monday's date . If its Mon,Tue or Wed then it should be the present Monday's date .
E.g: Today is Friday and the last Monday was on 18th .
So for yesterday , today,tomorrow and Sunday , the date should be displayed as 18-JUN-2012.
From the coming Monday to Wednesday , the date should of be the coming Monday i.e , 24-JUN-2012
I tried it doing under 'Source ' of item using PL/SQL expression and PL/SQL function body. Not working
Can someone help ?
Thanks & Regards
UmerNice1 wrote:
declare
lv_date number;
begin
select to_char(sysdate,'D') into lv_date from dual;
if lv_date=2 then
:P2_FROM_DATE := to_char(sysdate-1);
end if;
end;I tried this under " PL/SQL function body " in "Source " tab of the item P2_FROM_DATE
When I run this , nothing is displayed corresponding to the item P2_FROM_DATEExactly as expected. This code will only set a value for <tt>P2_FROM_DATE</tt> when run on Mondays in territories where the first day of the week is Sunday, and when run on Tuesdays where Monday is the first day of of the week:
SQL> var P2_FROM_DATE varchar2(30)
SQL> alter session set nls_date_format='Dy DD-MON-YYYY';
Session altered.
SQL> select sysdate from dual
SYSDATE
Mon 25-JUN-2012
SQL> alter session set nls_territory='AMERICA';
Session altered.
SQL> declare
2 lv_date number;
3 begin
4 select to_char(sysdate,'D') into lv_date from dual;
5 if lv_date=2 then
6 :P2_FROM_DATE := to_char(sysdate-1);
7 end if;
8 end;
9 /
PL/SQL procedure successfully completed.
SQL> print p2_from_date
P2_FROM_DATE
Sun 24-JUN-2012
SQL> alter session set nls_territory='UNITED KINGDOM';
Session altered.
SQL> exec :p2_from_date := null
SQL> declare
2 lv_date number;
3 begin
4 select to_char(sysdate,'D') into lv_date from dual;
5 if lv_date=2 then
6 :P2_FROM_DATE := to_char(sysdate-1);
7 end if;
8 end;
9 /
PL/SQL procedure successfully completed.
SQL> print p2_from_date
P2_FROM_DATE
SQL>Hence the questions about language above.
>
I am having a display only item -- :P2_FROM_Date . If its Thu,Fri,Sat or Sun I want to set the date as the last Monday's date . If its Mon,Tue or Wed then it should be the present Monday's date .
E.g: Today is Friday and the last Monday was on 18th .
So for yesterday , today,tomorrow and Sunday , the date should be displayed as 18-JUN-2012.
From the coming Monday to Wednesday , the date should of be the coming Monday i.e , 24-JUN-2012
>
The coming Monday is 25-JUN-2012.
Aren't these rules equivalent to "Monday this week, where Monday is the first day of the week"? In which case the PL/SQL Expression you require is:
trunc(sysdate, 'iw')For example:
SQL> with t as (
2 select date '2012-06-21' + level d from dual connect by level <= 17)
3 select
4 d
5 , trunc(d, 'iw') monday
6 from
7 t;
D MONDAY
Fri 22-JUN-2012 Mon 18-JUN-2012
Sat 23-JUN-2012 Mon 18-JUN-2012
Sun 24-JUN-2012 Mon 18-JUN-2012
Mon 25-JUN-2012 Mon 25-JUN-2012
Tue 26-JUN-2012 Mon 25-JUN-2012
Wed 27-JUN-2012 Mon 25-JUN-2012
Thu 28-JUN-2012 Mon 25-JUN-2012
Fri 29-JUN-2012 Mon 25-JUN-2012
Sat 30-JUN-2012 Mon 25-JUN-2012
Sun 01-JUL-2012 Mon 25-JUN-2012
Mon 02-JUL-2012 Mon 02-JUL-2012
Tue 03-JUL-2012 Mon 02-JUL-2012
Wed 04-JUL-2012 Mon 02-JUL-2012
Thu 05-JUL-2012 Mon 02-JUL-2012
Fri 06-JUL-2012 Mon 02-JUL-2012
Sat 07-JUL-2012 Mon 02-JUL-2012
Sun 08-JUL-2012 Mon 02-JUL-2012
17 rows selected.
SQL> alter session set nls_territory='AMERICA';
Session altered.
SQL> alter session set nls_date_format='Dy DD-MON-YYYY';
Session altered.
SQL> with t as (
2 select date '2012-06-21' + level d from dual connect by level <= 17)
3 select
4 d
5 , trunc(d, 'iw') monday
6 from
7 t;
D MONDAY
Fri 22-JUN-2012 Mon 18-JUN-2012
Sat 23-JUN-2012 Mon 18-JUN-2012
Sun 24-JUN-2012 Mon 18-JUN-2012
Mon 25-JUN-2012 Mon 25-JUN-2012
Tue 26-JUN-2012 Mon 25-JUN-2012
Wed 27-JUN-2012 Mon 25-JUN-2012
Thu 28-JUN-2012 Mon 25-JUN-2012
Fri 29-JUN-2012 Mon 25-JUN-2012
Sat 30-JUN-2012 Mon 25-JUN-2012
Sun 01-JUL-2012 Mon 25-JUN-2012
Mon 02-JUL-2012 Mon 02-JUL-2012
Tue 03-JUL-2012 Mon 02-JUL-2012
Wed 04-JUL-2012 Mon 02-JUL-2012
Thu 05-JUL-2012 Mon 02-JUL-2012
Fri 06-JUL-2012 Mon 02-JUL-2012
Sat 07-JUL-2012 Mon 02-JUL-2012
Sun 08-JUL-2012 Mon 02-JUL-2012
17 rows selected.Also note that using the item source properties will only set the <tt>P2_FROM_DATE</tt> in the rendered page, not in session state. -
Problem in Upload of data using FBZ5 which is for cheque form printing
hi Gurus,
I have done recording for uploading of the documents for printing of the cheques, using FBZ5 to code. now the problem is it is not picking up the items continuously one after the other and at the same time the cheques are not printing. what could be the problem and the code is given below. Please check out and let me know how to do. Like one by one document has to be generated and at the same time the cheque has to be printed.
perform bdc_dynpro using 'SAPMFCHK' '0750'.
perform bdc_field using 'BDC_CURSOR' 'OPAYF-PPRIZ'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'BKPF-BELNR' CHK_TAB-BELNR. " '2807000006'.
perform bdc_field using 'OPAYF-BUKRS' CHK_TAB-BUKRS. " '1000'.
perform bdc_field using 'BKPF-GJAHR' CHK_TAB-GJAHR. " '2007'.
perform bdc_field using 'OPAYF-RZAWE' 'C'.
perform bdc_field using 'OPAYF-PSTAP' CHK_TAB-PSTAP. " '1'.
perform bdc_field using 'OPAYF-PZFOR' 'ZF110_D_SCHECK13'.
perform bdc_field using 'OPAYF-PPRIZ' CHK_TAB-PPRIZ. " 'LOCL'.
perform bdc_field using 'OPAYF-PSOFO' 'X'.
perform bdc_field using 'OPAYF-PPRIA' 'locl'.
perform bdc_dynpro using 'SAPMFCHK' '0750'.
perform bdc_field using 'BDC_CURSOR' 'BKPF-BELNR'.
perform bdc_field using 'BDC_OKCODE' '=DRUK'.
perform bdc_dynpro using 'SAPMFCHK' '0750'.
*perform bdc_field using 'BDC_CURSOR' 'BKPF-BELNR'.
perform bdc_field using 'BDC_OKCODE' '=NEW'. "'/EEND'.
**perform bdc_dynpro using 'SAPMFCHK' '0750'.
**perform bdc_field using 'BDC_OKCODE' '=DRUK'. "'/EEND'.
**perform bdc_field using 'BDC_CURSOR' 'BKPF-BELNR'.
Thanks
SyamaHI
I am sending the full code. now it is printing continuously, but it is not printing the check from the cheque printer, but the invoice is printed on the A4 sheet. What wuold be the problem.
report ZCHECK
no standard page heading line-size 255.
DATA : BEGIN OF CHK_TAB OCCURS 100,
BELNR LIKE BKPF-BELNR,
BUKRS LIKE OPAYF-BUKRS,
GJAHR LIKE BKPF-GJAHR,
PSTAP LIKE OPAYF-PSTAP,
PPRIZ LIKE OPAYF-PPRIZ,
END OF CHK_TAB.
DATA: v_opt LIKE ctu_params,
v_ltext1(70) TYPE c,
v_ltext2(70) TYPE c,
v_tabix LIKE sy-tabix.
*-- Internal Table for including the structure alsmex_tabline
DATA: BEGIN OF i_excel OCCURS 0.
INCLUDE STRUCTURE alsmex_tabline.
DATA: END OF i_excel.
Batch input data
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
messages of call transaction
DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
PARAMETERS: p_file TYPE rlgrap-filename OBLIGATORY,
start TYPE i OBLIGATORY, end TYPE i OBLIGATORY,
dismode TYPE ctu_params-dismode DEFAULT 'A' OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = syst-repid
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
STATIC = ' '
MASK = ' '
CHANGING
file_name = p_file
EXCEPTIONS
mask_too_long = 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.
START-OF-SELECTION.
DATA l_file TYPE string.
CLEAR l_file.
l_file = p_file.
*-- Calling the function ALSM_EXCEL_TO_INTERNAL_TABLE
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = 1
i_begin_row = start
i_end_col = 50
i_end_row = end
TABLES
intern = i_excel
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
END-OF-SELECTION.
DATA: v_opltext(600) TYPE c,
v_ipltext(600) TYPE c,
v_len TYPE i,
r_count(2) TYPE c,
v_rowcount(2) TYPE c,
v_screenfld(132) TYPE c,
msg_txt(150) TYPE c.
LOOP AT i_excel.
CASE i_excel-col.
WHEN '0001'.
CHK_TAB-BELNR = i_excel-value.
WHEN '0002'.
CHK_TAB-BUKRS = i_excel-value.
WHEN '0003'.
CHK_TAB-GJAHR = i_excel-value.
WHEN '0004'.
CHK_TAB-PSTAP = i_excel-value.
WHEN '0005'.
CHK_TAB-PPRIZ = i_excel-value.
ENDCASE.
AT END OF row.
APPEND CHK_TAB.
CLEAR CHK_TAB.
ENDAT.
ENDLOOP.
v_opt-dismode = dismode.
v_opt-updmode = 'S'.
LOOP AT CHK_TAB.
CLEAR: v_tabix.
v_tabix = sy-tabix.
perform bdc_dynpro using 'SAPMFCHK' '0750'.
perform bdc_field using 'BDC_CURSOR' 'BKPF-GJAHR'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'BKPF-BELNR' CHK_TAB-BELNR. "'2807000008'.
perform bdc_field using 'OPAYF-BUKRS' CHK_TAB-BUKRS. "'1000'.
perform bdc_field using 'BKPF-GJAHR' CHK_TAB-GJAHR. "'2007'.
perform bdc_field using 'OPAYF-RZAWE' 'C'.
perform bdc_field using 'OPAYF-PSTAP' CHK_TAB-PSTAP. "'1'.
perform bdc_field using 'OPAYF-PZFOR' 'ZF110_D_SCHECK13'.
perform bdc_field using 'OPAYF-PPRIZ' CHK_TAB-PPRIZ. "'locl'.
perform bdc_field using 'OPAYF-PSOFO' 'X'.
perform bdc_field using 'OPAYF-PPRIA' 'locl'.
perform bdc_dynpro using 'SAPMFCHK' '0750'.
perform bdc_field using 'BDC_CURSOR' 'BKPF-BELNR'.
perform bdc_field using 'BDC_OKCODE' '=DRUK'.
**perform bdc_field using 'BKPF-BELNR' '2807000008'.
**perform bdc_field using 'OPAYF-BUKRS' '1000'.
**perform bdc_field using 'BKPF-GJAHR' '2007'.
**perform bdc_field using 'OPAYF-RZAWE' 'C'.
**perform bdc_field using 'OPAYF-PSTAP' '1'.
**perform bdc_field using 'OPAYF-PZFOR' 'ZF110_D_SCHECK13'.
**perform bdc_field using 'OPAYF-PPRIZ' 'locl'.
**perform bdc_field using 'OPAYF-PSOFO' 'X'.
**perform bdc_field using 'OPAYF-PPRIA' 'locl'.
perform bdc_dynpro using 'SAPMFCHK' '0750'.
perform bdc_field using 'BDC_OKCODE' '/EEND'.
perform bdc_field using 'BDC_CURSOR' 'BKPF-BELNR'.
**perform bdc_dynpro using 'SAPMFCHK' '0750'.
**perform bdc_field using 'BDC_CURSOR' 'OPAYF-PPRIZ'.
**perform bdc_field using 'BDC_OKCODE' '/00'.
**perform bdc_field using 'BKPF-BELNR' CHK_TAB-BELNR. " '2807000006'.
**perform bdc_field using 'OPAYF-BUKRS' CHK_TAB-BUKRS. " '1000'.
**perform bdc_field using 'BKPF-GJAHR' CHK_TAB-GJAHR. " '2007'.
**perform bdc_field using 'OPAYF-RZAWE' 'C'.
**perform bdc_field using 'OPAYF-PSTAP' CHK_TAB-PSTAP. " '1'.
**perform bdc_field using 'OPAYF-PZFOR' 'ZF110_D_SCHECK13'.
**perform bdc_field using 'OPAYF-PPRIZ' CHK_TAB-PPRIZ. " 'LOCL'.
**perform bdc_field using 'OPAYF-PSOFO' 'X'.
**perform bdc_field using 'OPAYF-PPRIA' 'locl'.
**perform bdc_dynpro using 'SAPMFCHK' '0750'.
**perform bdc_field using 'BDC_CURSOR' 'BKPF-BELNR'.
**perform bdc_field using 'BDC_OKCODE' '=DRUK'.
**perform bdc_dynpro using 'SAPMFCHK' '0750'.
**perform bdc_field using 'BDC_CURSOR' 'BKPF-BELNR'.
**perform bdc_field using 'BDC_OKCODE' '=NEW'. "'/EEND'.
**perform bdc_dynpro using 'SAPMFCHK' '0750'.
**perform bdc_field using 'BDC_OKCODE' '=DRUK'. "'/EEND'.
**perform bdc_field using 'BDC_CURSOR' 'BKPF-BELNR'.
'=ENTE'. '=BU'.
CALL TRANSACTION 'FBZ5' USING bdcdata
OPTIONS FROM v_opt MESSAGES INTO messtab.
WRITE:/10 'ROW:' COLOR 4,v_tabix.
LOOP AT messtab.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = messtab-msgid
lang = sy-langu
no = messtab-msgnr
v1 = messtab-msgv1
v2 = messtab-msgv2
v3 = messtab-msgv3
v4 = messtab-msgv4
IMPORTING
msg = msg_txt
EXCEPTIONS
not_found = 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.
IF messtab-msgtyp EQ 'E'.
WRITE:/10 messtab-msgtyp,msg_txt COLOR 6.
ELSEIF messtab-msgtyp EQ 'S'.
WRITE:/10 messtab-msgtyp,msg_txt COLOR 5.
ELSEIF messtab-msgtyp EQ 'W'.
WRITE:/10 messtab-msgtyp,msg_txt COLOR 3.
ELSE.
WRITE:/10 messtab-msgtyp,msg_txt COLOR 4.
ENDIF.
CLEAR msg_txt.
ENDLOOP.
ULINE.
REFRESH:bdcdata,messtab.
ENDLOOP.
*& Form BDC_DYNPRO
text
-->PROGRAM Program name
-->DYNPRO Screen number
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "bdc_dynpro
*& Form BDC_FIELD
Insert batch input data
-->FNAM Screen Field Name
-->FVAL Field Value
FORM bdc_field USING fnam fval.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDFORM. "BDC_FIELD
**perform bdc_transaction using 'FBZ5'.
**perform close_group. -
Billing schedule Dates using a BAPI/FM for a sales order line
Hello,
I am trying to update a sales order line with an Item category which inturn updates the Billing Plan.
I am able to update the sales order with required details and the default billing plan.
Now I want to change the Billing schedule i.e the Billing Plan dates Invoice end date and the percantage etc whcih I am trying to do using
SD_ORDER_BILLING_SCHEDULE AND BILLING_SCHEDULE_MAINTAIN AND THEN BILLING_SCHEDULE_SAVE.
This for some reason will not update the Billing schedule.
It triggers the user exists etc but even though I pass all the required details in the Old and new FPLA and FPLT tables...it is not helping.
When I tried using BILLING_SCHEDULE_DIALOG it opens the screen with the Billing plan in edit mode.
Is there any other way to do the updates.I tried changing in the User exist etc. I also checked the program sdfpla02.
Many thanks,
Krishna.
Edited by: Krishna on Mar 21, 2011 8:30 PMSee the following example
* Read the billing plan
CALL FUNCTION 'BILLING_SCHEDULE_READ'
EXPORTING
fplnr = hfplnr
TABLES
zfpla = hfpla
zfplt = hfplt.
MOVE hfpla TO hfpla2.
*READ TABLE zfpla2 INDEX 1.
hfpla2-lodat = p_stat.
hfpla2-tndat = p_end.
hfpla2-rfpln = ''.
hfpla2-lodar = ''.
hfpla2-tndar = ''.
hfpla2-fpart = p_bplan.
hfpla2-perio = p_bplan.
hfpla2-horiz = p_hori.
*** Very important to set field updkz = 'U' ***
hfpla2-updkz = 'U'. "--> UPDATE!!
APPEND hfpla2.
CLEAR pos.
CALL FUNCTION 'BILLING_SCHEDULE_SAVE'
TABLES
fpla_new = hfpla2
fpla_old = hfpla
fplt_new = hfplt " --> NEW
fplt_old = hfplt.
CALL FUNCTION 'SD_SALES_DOCUMENT_SAVE'
EXPORTING
i_no_messages = ' '.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
CALL FUNCTION 'SD_SALES_DOCUMENT_READ'
EXPORTING
document_number = doc.
MOVE zbill-itm_number TO pos.
CALL FUNCTION 'SD_SALES_BILLINGPLAN_READ'
EXPORTING
i_vbeln = doc
i_posnr = pos
IMPORTING
e_fpla = e_fpla
TABLES
e_fplt = e_fplt
EXCEPTIONS
no_billingplan_allowed = 1
no_billingplan_found = 2
OTHERS = 3.
IF sy-subrc NE 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Read the billing plan
CALL FUNCTION 'BILLING_SCHEDULE_READ'
EXPORTING
fplnr = e_fpla-fplnr
* I_VFKDAT =
* I_BFKDAT =
TABLES
zfpla = zfpla
zfplt = zfplt.
* Upddate the ZFPLT2 table with the new values
*MOVE zfplt TO zfplt2.
MOVE zfpla TO zfpla2.
*READ TABLE zfpla2 INDEX 1.
zfpla2-lodat = zbill-datesfrom.
zfpla2-tndat = zbill-datesto.
zfpla2-rfpln = ''.
zfpla2-lodar = ''.
zfpla2-tndar = ''.
zfpla2-fpart = p_bplan.
zfpla2-horiz = p_hori.
*** Very important to set field updkz = 'U' ***
zfpla2-updkz = 'U'. "--> UPDATE!!
APPEND zfpla2.
ENDLOOP.
CLEAR pos.
CALL FUNCTION 'BILLING_SCHEDULE_SAVE'
TABLES
fpla_new = zfpla2
fpla_old = zfpla
fplt_new = zfplt " --> NEW
fplt_old = zfplt.
CALL FUNCTION 'SD_SALES_DOCUMENT_SAVE'
EXPORTING
i_no_messages = ' '.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'. -
Create Test data using T-SQl script for each row
Hi team,
I am looking for a sql code snippet which read data from below table
UserId username contact
1 Anil 111
2 Sunil 222
and insert data to below table with some test data appending sequence number 1,2,3 for only City and Email. Both are different tables
and does not have any referencial integrity
No of records inserted for user is configurable for example count = 3
Username City Email
Anil city1 email1
Anil city2 email2
Anil city3 email3
Sunil city1 email1
Sunil city2 email2
Sunil city3 email3DECLARE @cnt INT=3
DECLARE @Users TABLE(UserId INT, UserName VARCHAR(99),Contact INT)
INSERT INTO @Users VALUES
(1,'Anil',111),
(2,'Sunil',222)
SELECT UserName,'city'+CAST(num AS varchar(10)) city FROM @Users
CROSS APPLY
SELECT TOP(@cnt) number +1 AS num
FROM master..spt_values
WHERE type = 'P') AS Der
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Forms - "Weekend Ending Date" used to Poplulate Date Fields
Hello,
This is my first topic, so my apologies if it is then wrong place...
Quick question (using Acrobat 9.0 CS4 Pro Ext.),
I am trying to set up a form where I input the week ending date (xx-xx-xx) into field "date_1"
Once the week-ending date is input into "date_1", I would like the following fields to populate with the dates from the prior week (Monday-Sunday) "date_2", "date_3", "date_4", "date_5", "date_6", "date_7", and "date_8" respectively. Where the week-ending date, "date_1" equals the Sunday date "date_8"
Example:
*Input 02-21-10 into field "date_1"
*Auto-populate the following:
"date_2" 02-15-10
"date_3" 02-16-10
"date_4" 02-17-10
"date_5" 02-18-10
"date_6" 02-19-10
"date_7" 02-20-10
"date_8" 02-21-10
Can I use any formula with some sort of "date"+1 calulation like you can in MS Excel, or must I use some sort of script? I am not familiar with formulas or scripts in Acrobat, so any help would be appreciated. Hope I explained sufficiently.
Thank you all in advance!Anybody?
-
SRP547W, How to use multiple WAN IPs for port forwarding?
Hi folks,
We've run into some difficulty trying to take advantage of multiple WAN IPs in conjunction with the SRP547, and I'm hoping someone here can help out or at least tell us that we're going to need to buy a different router...
What we're trying to acheive is the ability to port forward from our distinct public IPs to different internal servers. Looking at the options under Port Forwarding it looks like we can only configure forwards at the "WAN interface" level, but our problem is that we can't work out how to set up separate interfaces for each of our Public IPs...
Our ISP provides us with a fully managed NTU/router with a single "Internet" ethernet port, which we can use by statically configuring IPs on our end. For this configuration this port has been directly patched to the WAN ethernet port on the SRP547W.
We have been allocated a 255.255.255.248 (/29) subnet, giving us 5 usable IPs after the ISP's gateway address is taken into account, like so:
a.b.c.208 Network Address (/29 subnet)
a.b.c.209 ISP Gateway
a.b.c.210 IP1
a.b.c.211 IP2
a.b.c.212 IP3
a.b.c.213 IP4
a.b.c.214 IP5
a.b.c.215 Broadcast Address
On the SRP we've set up the default "Ethernet WAN2" sub-interface with the following details for IP1
VLAN ID: 4088 (Uneditable)
Connection Type: Static IP
Internet IP Address: a.b.c.210
Subnet Mask: 255.255.255.248
Default Gateway: a.b.c.209
The next step (I would have thought) would be to add a second sub-interface, using similar info for IP2
VLAN ID: 4000 (Chosen arbitrarily)
Connection Type: Static IP
Internet IP Address: a.b.c.211
Subnet Mask: 255.255.255.248
Default Gateway: a.b.c.209
When we try to do so however we get:
Fail!
Conflict with Ether_WAN2 interface address type
I should mention at this point that we're running on firmware version 1.02.01 (023).
Any suggestions on how we can proceed?
Is there a CLI or other method of configuration that might work if the web interface won't?
Thanks,
Tim.OK, I've seen reference to this solution before but not much in the way of details. Perhaps you can spell out how this ought to work, as the Software DMZ doesn't behave as I'd expected it to.
As before, on the SRP we've set up the default "Ethernet WAN2" sub-interface with the details for IP1 with a /29 subnet.
VLAN ID: 4088 (Uneditable)
Connection Type: Static IP
Internet IP Address: a.b.c.210
Subnet Mask: 255.255.255.248
Default Gateway: a.b.c.209
We'd now like to expose a server function on IP2, let's say LAN details for this server are:
VLAN: 3000
VLAN IP Range: 192.168.1.1/24
Server IP: 192.168.1.10
Server Port: 80
So first we turn on Software DMZ:
Status: Enabled
Public IP: a.b.c.211
Private IP: 192.168.1.10
WAN Interface: Ether_WAN2
My understanding, based on what you've said, is that this should expose the whole server to external access via IP2. Unfortunately, it doesn't seem to work this way - we don't seem to have any access at all. Perhaps there's a default deny rule on the firewall?
Just to be sure, I tried creating a rule to allow HTTP traffic to the server in the Advanced Firewall page.
In Interface (WAN): All
Out Interface (LAN): VLAN.3000
Source IP: 0.0.0.0
Source Subnet: 0.0.0.0
Destination IP: 192.168.1.10
Destination Subnet: 255.255.255.255
Protocol: TCP
Source Port: Any
Destination Port: Single:80
Action: Permit
Schedule: Everyday
Times: 24 Hours
Still no dice. What am I missing?
Cheers,
Tim. -
Warning: untrusted X11 forwarding setup failed: xauth key data not generate
Upon connecting to a RedHat Enterprise Linux server via ssh -X I get the following:
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
I have previously (as in last week, ending 11/1/2008) been able to use x11 forwarding from the machine I'm trying to connect to. This problem also occurs with other servers, meaning it must be a problem with my local machine. Any suggestions are welcome.I get that if I use
ssh -Y ...
but NOT with -X.
Do you have a $HOME/.ssh/config or /etc/ssh_config file that is specifying ForwardX11Trusted?
Mostly I ignore the message when I get it as, my X11 forwarding works OK, AND I'm in an environment where my fellow employees could do much naster things to me (and get fired for it), than spoofing my X11 sessions. -
Use FI Posting date as a filter value, can I get YTD for current year?
Dear Expert,
I work on a BI report which calculate the YTD key figure (restricted by 0CYEAR and =< 0CMONTH).
One of the requirement for the report is to allow user to enter a value for a date using FI Posting date (although this is optional).
Without entering the value for FI Posting date, my report works fine.
But once FI Posting date is entered, no data found.
I expect that when the value for the FI Posting date is entered, the YTD value will be calcuated starting from the Jan 1 of that FI Posting year to the FI Posting date entered.
But this seems not happen.
Could you help me to resolve this problem?
If there is a better solution, please let me know.
Very appreciated.
ArthurHi Dipika,
Thanks for your reply.
In my report, FI Posting date is a free characteristic, which user can optionally select it and fiter it for a specific FI Posting Date. Do you consider it as a global filter?
my query structure is as below:
rows: profit center, department, manager
columns: YTD for current year, YTD for Previous year, the difference betwwen the two
The requirement is when user enter a FI Posting date, use it to restrict the KF shown above.
For example, if the FI posting date is March 15, 2008, then YTD for current year should be restricted by the period between Jan 1, 2008 and March 15, 2008 and YTD for previous year should be restricted by Jan 1, 2007 and March 15, 2007.
Do you have any idea how to implement this requirement in term of FI Posting date?
Thanks and appreciated.
Arthur -
Unable to load CSV data using APEX Data Load using Firefox/Safari on a MAC
I have APEX installed on a Windows XP machine connected to an 11g database on the same Windows XP machine.
While on the windows XP, using IE 7, I am able to successfully load a CSV spreadsheet of data using the APEX Data Load utility.
However, if I switch to my MacBook Pro running OS X leopard, then login into same APEX machine using Firefox 2 or 3 or Safari 3, then try to upload CSV data, it fails on the "Table Properties" step when it asks you for the name of the new table and then asks you to set table properties, the table properties just never appear (they do appear in IE 7 on Windows XP) and if you try to hit the NEXT button, you get error message: "1 error has occurred. At least one column must be specified to include in new table." and of course, you can't specify the any of the columns because there is nothing under SET TABLE PROPERTIES in the interface.
I also tried to load data with Firefox 2, Firefox 3 (beta), and Safari 3.1, but get same failed result on all three. If I return to the Windows XP machine and use IE 7.0, Data Load works just fine. I work in an ALL MAC environment, it was difficult to get a windows machine into my workplace, and all my end users will be using MACs. There is no current version of IE for the MAC, so I have to use Firefox or Safari.
Is there some option in Firefox or Safari that I can turn on so this Data Load feature will work on the MAC?
Thanks for your help. Any assistance appreciated.
TonyI managed to get this to work by saving the CSV file as Windows CSV (not DOS CSV), which allowed the CSV data to be read by Oracle running on Windows XP. I think the problem had to do with different character sets being used for CSV on MAC versus CSV on Windows. Maybe if I had created my windows XP Oracle database with Unicode as the default character set, I never would have experienced this problem.
-
How to upload different views of customer master data using LSMW-IDOC
I need to upload customer master data using LSMW Idoc method for my client. Now customer will have different views like main view, Sales data, Company code data, Partner function data etc. And except main data all other data can be multiple for each customer. We are going to upload data from tab delimited .TXT file. Should I propose different LSMW for upload different views for the customer from different .TXT files? or we can upload all the customer related data (like main view data and partner function data )from a single .TXT file. Kindly suggest which one in convenient and how we can prepare the data file in both cases.
convinient is the method that you can handle.
but as the guy who loads the data you have to load the data like they are available, like it is convinient for others to prepare the data.
In general there is no problem to use an IDOC method to load a customer master with multiple comany codes and several sales orgs in one shot.
the data can be in one source file, but need then to be maintained in a certain way
Example1: all data in 1 structure
GD1 - CC1 - SO1
GD1 - CC2 - SO2
GD1 - CC2 - SO3
in this case the GD (general data) is redundand in each line which has different Company code data or different Sales Org data
Example2: all data in 3 sturcures but one file
GD1
.CC1
.CC2
..SO1
..SO2
..SO3
Example3: data delivered in 3 files - you join the files in LSMW, they must have a common identifier like the old customer number in the beginning of each file
FILE General data:
GD1
GD2
GD3
file Compamy code data:
CC1
CC2
CC3
file Sales org data:
SO1
SO2
SO3
LSMW is flexible and can handle each of this scenarios, are you flexible too? -
when is use my phone to access the internet using my wi-fi does it count as data use against my data limit?
MaryBeau, great minds think alike. When connected to WiFi, data usage is not debited from your data allowance since you are not connected to our network. This is great way to save your data allowance when streaming music, videos, or movies on your device. Additionally, for your convenience, you can monitor your data a few ways: http://vz.to/18dZIu4
LasinaH_VZW
Follow us on Twitter @VZWSupport
Maybe you are looking for
-
Can anyway say to me the PCI/AGP dividers of MSI Kt3 ULTRA -ARU? Thanx in advance
-
Dear Experts, The following are my issue points: 1. If in IT0587, Eligible Pay is selected, then if for eg., Basic Salary is Rs. 10000, then in this case, PF shud come as Rs. 1200. 2. If in IT 0587, PF Basis is selected, then if for eg, Basic Salary
-
How to connect Apple TV to other users at the internet
Can anyone tell me if I can share a iTunes libary with a friend/brother who also have direct ADSL connection to the internet? We both have a Apple TV device and iTunes, and would like to share the contens with each other. I have already tried the net
-
Row Selector column on Interactive Report
Hi all, I have an interactive report based on a custom SQL query. How do I add a row selctor column so I cans select individual rows? I have also tried using a tabular form which also does not display a row selctor column. This is odd as my other tab
-
Anyconnect session accounting via radius or syslog ?
Hi Does anyone have a deployed accounting method to log Anyconnect session details ? Do you do it via a radius server or via logging messages to a syslog server ? If so could you assist with appropriate configuration ? I am looking to log successfu