Remodelling coding
We have field storage location stor_loc in our ods. Using remodelling we are are trying to fill the data
using remodelling option by adding characteristic zstor using customer exit . Following are the code writtine. Even the break point set, the system is not stopping in the debugging mode.
field-symbols : <l_s_old> type any,
<l_fillfield> type any,
<l_newfield> type any,
<l_stor_loc> type any,
<l_version_dimid> type any,
<l_version_sid> type any.
DATA : l_chavl type rschavl,
l_zsto_loc_chavl type rschavl,
l_attr type string,
l_version_sid type /BIC/AZSD_O2100-stor_loc,
l_version type C.
ASSIGN c_r_newfield->* TO <l_newfield>.
ASSIGN i_r_old->* TO <l_s_old>.
ASSIGN COMPONENT 'SID_ZSTOR' OF STRUCTURE <l_s_old> TO <l_fillfield>.
ASSIGN COMPONENT 'BILL_NUM' OF STRUCTURE <l_s_old> TO <l_version_dimid>.
break-point.
select single STOR_LOC from /BIC/AZSD_O2100 into <l_version_sid>
where BILL_NUM = <l_version_dimid>.
if sy-subrc <> 0.
RAISE EXCEPTION TYPE cx_rscnv_exception
EXPORTING
attr1 = 'CL_RSCNV_USER_EXIT_SAMPLE'
attr2 = 'EXIT-1'
attr3 = <l_version_dimid>.
l_attr = sy-subrc.
endif.
CALL FUNCTION 'RRSI_SID_VAL_CONVERT_COMPLETE'
EXPORTING
I_IOBJNM = 'ZTOR'
I_SID = <l_version_sid>
IMPORTING
E_CHAVL = l_version
EXCEPTIONS
NO_VALUE_FOR_SID = 1
X_MESSAGE = 2
OTHERS = 3.
if sy-subrc <> 0.
RAISE EXCEPTION TYPE cx_rscnv_exception
EXPORTING
attr1 = 'CL_RSCNV_USER_EXIT_SAMPLE'
attr2 = 'EXIT-1'
attr3 = <l_version_dimid>.
l_attr = sy-subrc.
endif.
endmethod.
I have a feeling that if you have posted in the ABAP forum, you would have get more responses. Check this link and post there
[Forum: ABAP, General |ABAP Development;
thanks
G. Lakshmipathi
Similar Messages
-
I have a few questions after reviewing postings on Remodeling
Hi Experts,
I have some questions after review postings on Remodeling
Review Source:
a) /people/mallikarjuna.reddy7/blog/2007/02/06/remodeling-in-nw-bi-2004s
b) https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/008f9fef-22e4-2a10-d994-a17c55ca06f0
1. In Adding a new char Zreg, the author set it to a CONSTANT as INDIA. What if in my environment, the added characteristic is also ZCOUNTRY but could take on VALUES such as US, Canada, Mexico, will the be the option:
1:1 Mapping with Characteristics? If not, please help.
2. Again, in the demonstration of the u201CAdd key figureu201D in the remodeling of the cube, the author used CONSTANT = 100. Can you help me understand a situation in production where you will have to set a key figure to a constant value? E.g. u201CNet Salesu201D should always be $5000? I may be missing the point in that remodeling.
3. I also noticed that while remodeling CHARACTERISTICS, there was the option u201CCUSTOMER Exitu201D but in the case of KEY FIGURE the option was u201CUSER Exitu201D
Any reason why one is CUSTOMER and the other as USER?
4. There was the emphasis to u201C.. backup database before running remodeling requests..u201D Is it referring to Basis backing up the BW system? Or, is there a way to take a copy of the cube to be remodeled and its data? If it is the second option, any hints on how?
5. I have heard of scary cases during remodeling, is there a way to simulate and approve of the changes before actually implementing it? How?
Also, Are these changes that need to be done in development to be transported to production?
Thanks
Edited by: Amanda Baah on Jan 23, 2009 12:18 PMHi Amanda........
1. In Adding a new char Zreg, the author set it to a CONSTANT as INDIA. What if in my environment, the added characteristic is also ZCOUNTRY but could take on VALUES such as US, Canada, Mexico, will the be the option:
1:1 Mapping with Characteristics? If not, please help.
In this case coding is required............So u hav to go for Customer exit........
If u do 1:1 Mapping with Characteristics..........it will access value as per that Characteristics.....
2. Again, in the demonstration of the u201CAdd key figureu201D in the remodeling of the cube, the author used CONSTANT = 100. Can you help me understand a situation in production where you will have to set a key figure to a constant value? E.g. u201CNet Salesu201D should always be $5000? I may be missing the point in that remodeling.
Suppose price of a product...........it will not change everyday...............that keyfigure hav to set as a constant value...........
3. I also noticed that while remodeling CHARACTERISTICS, there was the option u201CCUSTOMER Exitu201D but in the case of KEY FIGURE the option was u201CUSER Exitu201D
Any reason why one is CUSTOMER and the other as USER?
Look thereis a difference between User exit and Customer exit..........I am not very sure when user exit is required and when customer exit.......
Check this..............
http://www.sap-img.com/abap/what-is-user-exits.htm
4. There was the emphasis to u201C.. backup database before running remodeling requests..u201D Is it referring to Basis backing up the BW system? Or, is there a way to take a copy of the cube to be remodeled and its data? If it is the second option, any hints on how?
if you want to transfer the content of one infocube to another one ...............
a) generated the export datasource for the source infocube...right-click->'generate export datasource
b) create transformation.......(without any filter or calculation, with the mapping 1:1 to all the infoobjects) ................in this way u can 'copy' (with one shot data load, as a full request) all the data.........
5. I have heard of scary cases during remodeling, is there a way to simulate and approve of the changes before actually implementing it? How?
Also, Are these changes that need to be done in development to be transported to production?
Generally u will don't hav changing authorization in PROD.........Look frankly speaking..........I hav never done Remodeling..........but as per the statement .......During remodeling process InfoCube is locked for any changes or data loads so make sure you stall all the data loads for this InfoCube till the time this process finishes..............I think we do remodeling directly in PROD only.........
Regards,
Debjani...... -
Adobe Bridge CS6, Output to HTML Gallery coding issue.
Adobe Bridge CS6, Output to HTML Gallery coding issue.
I have created the html, JavaScript, css file using the output function in Bridge CS6, which nicely generates the coding, pages, folders and files. I can edit the html files such as gallery title, name, etc., in Dreamweaver CS6 just fine and preview them in a selected browser (both chrome and IE) and everything works fine.
When I ftp upload the files and directories into my hosting account (Go Daddy), the images do not show up. The file table appears but the thumbs images does not appear and when selected to preview the larger image, it does not appear either. I have not altered the file structure at all. Go Daddy says it is a coding issue, but I cannot fine any errors.
Have you seen this issue before? All Adobe help research have failed. Any suggestions??Have you asked on Go Daddy site for help in uploading Adobe Bridge script? Just to say it is coding is not helpful.
-
Adobe Cloud: coding auf unterster Ebene
Ich bin jetzt 52 Jahre Alt und benutze Adobe Produkte in meinem Job und Alltag seit den Anfängen von Windows resp. Apple! Dies teils weil die Produkte gut waren oder meistens weil Adobe alles andere aufgekauft hat (siehe Makromedia)
Ich kann behaupten dass Ich als Firmenchef, Designer, Grafiker und was noch Alles 1000de von Euro resp Dollar in den letzten 10-20 Jahren an Adobe abgedrückt habe (rechnet man die Firmen mit die Adobe alle inzwischen aufgekauft hatt)
Ich hab jetzt ein Cloud Abbo auf meinen Namen laufen, mehrer Suits Nenn ich mein eigen und in dem Gymnasium wo Ich arbeite 100te von Adobe Lizensen eingeführt.
Das was Adobe sich in letzter Zeit auf coding Ebene leistet, Hauptsächlich der "Adobe Application Manager" zeugt von einem Dilettantismus, einem Unvermögen Sauber zu programmieren wie es auf Ebene solch einer grossen Firma, Marketleader noch NIE gegeben hat!
Ich habe die ganze Suite mehrmals komplett von meinem System genommen, das System läuft sauber und stabil. Sobald Ich die einzelnen Elemente "Photoshop, Dreamweaver usw über den Manager installiere crasht regelmässig mein System oder wird extrem langsam!
Ich erinnere nur an den offenen Brief von Steve Jobs (nein, Ich bin kein Apple Jünger) an Adobe vor ein paar Jahren. Ich zahle eine Monatliche Gebühr und muss arbeiten um meine Familie zu ernähren, ADOBE!Ja, wissen wir doch. Schön, dass wir mal drüber gesprochen haben.
Mylenium -
How to get the table name in the trigger definition without hard coding.
CREATE TRIGGER db.mytablename
AFTER UPDATE,INSERT
AS
INSERT INTO table1(col1)
SELECT InsRec.col1
FROM
INSERTED Ins
--Below i am calling one sp for which i have to pass the table name
EXEC myspname 'tablename'
In the above trigger,presently i am hard coding the tablename
but is it possible to get the table name dynamically on which the trigger is defined in order to avoid hard coding the table nameI really liked your audit table concept. You inspired me to modify it so that, the entire recordset gets captured and added a couple of other fields. Wanted to share my end result.
USE [YourDB]
GO
/****** Object: Trigger [dbo].[iudt_AutoAuditChanges] Script Date: 10/18/2013 12:49:55 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[iudt_AutoAuditChanges]
ON [dbo].[YourTable]
AFTER INSERT,DELETE,UPDATE
AS
BEGIN
SET NOCOUNT ON;
Declare @v_AuditID bigint
IF OBJECT_ID('dbo.AutoAudit','U') IS NULL BEGIN
CREATE TABLE [dbo].[AutoAudit]
( [AuditID] bigint identity,
[AuditDate] DateTime,
[AuditUserName] varchar(128),
[TableName] varchar(128) NULL,
[OldContent] XML NULL,
[NewContent] XML NULL
ALTER TABLE dbo.AutoAudit ADD CONSTRAINT
PK_AutoAudit PRIMARY KEY CLUSTERED
[AuditID]
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
CREATE NONCLUSTERED INDEX [idx_AutoAudit_TableName_AuditDate] ON [dbo].[AutoAudit]
( [TableName] ASC,
[AuditDate] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
END
Select * Into #AuditDeleted from deleted
Select * Into #AuditInserted from inserted
While (Select COUNT(*) from #AuditDeleted) > 0 OR (Select COUNT(*) from #AuditInserted) > 0
Begin
INSERT INTO [dbo].[AutoAudit]
( [AuditDate], [AuditUserName], [TableName], [OldContent], [NewContent])
SELECT
GETDATE(),
SUSER_NAME(),
[TableName]=object_name([parent_obj]),
[OldContent]=CAST((SELECT TOP 1 * FROM #AuditDeleted D FOR XML RAW) AS XML),
[NewContent]=CAST((SELECT TOP 1 * FROM #AuditInserted I FOR XML RAW) AS XML)
FROM sysobjects
WHERE
[xtype] = 'tr'
and [name] = OBJECT_NAME(@@PROCID)
Set @v_AuditID = SCOPE_IDENTITY()
Delete from AutoAudit
Where AuditID = @v_AuditID
AND Convert(varchar(max),oldContent) = Convert(varchar(max),NewContent)
Delete top(1) from #AuditDeleted
Delete top(1) from #AuditInserted
End
END -
How to create sap directories in application server by coding.
Hi Experts,
Please tell me how to create a sap directory via coding in application server.
Please tell me step by step n send the code also.I have tried alot using FM 'SXPG_COMMAND_EXECUTE' but i dont know how to use it n wht are d parameters i need to pass.
Also, i found that we need to create a external command in SM69 to pass in this FM...i dont know how to create this.
Please help me out.Hi friend,
1. Goto to Transaction SM69.
2. Click on F5.
3. Click on F6.
4. Enter a name in Command Name box ex: z_com
5. Enter a os command in Operating system command box. ex: mkdir (creating a directory)
6. Give location in application server in Parameters for operating system command box ex: /C dir
7. Click Save.
Goto SE 38 and develop a report using FM 'SXPG_COMMAND_EXECUTE' .
Ex:
REPORT zawi_demodownload .
data: g_out like BTCXPM occurs 0,
z_com type SXPGCOLIST-NAME value 'mkdir'.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = z_com
TABLES
exec_protocol = g_out
EXCEPTIONS
NO_PERMISSION = 1
COMMAND_NOT_FOUND = 2
PARAMETERS_TOO_LONG = 3
SECURITY_RISK = 4
WRONG_CHECK_CALL_INTERFACE = 5
PROGRAM_START_ERROR = 6
PROGRAM_TERMINATION_ERROR = 7
X_ERROR = 8
PARAMETER_EXPECTED = 9
TOO_MANY_PARAMETERS = 10
ILLEGAL_COMMAND = 11
WRONG_ASYNCHRONOUS_PARAMETERS = 12
CANT_ENQ_TBTCO_ENTRY = 13
JOBCOUNT_GENERATION_ERROR = 14
OTHERS = 15.
IF sy-subrc = 0.
ENDIF.
Thanks....... -
Coding Confusion: Links linking to wrong...links
Hi everyone,
I'm writing some code in Flash MX 2004 and everything works fine except for the last button (4DSystemsProducts). According to the coding if none of the drop down buttons work it should go to products.php, but for some reason it goes to 4DSystemsProducts.php. All of the other menus are coded the same way and work fine, if I take out that button it works fine, or if I take out button 7 and switch 4DSystems to button 7 everything works.
Here is the code to clear up this explanation.
[CODE]
function getActiveSub()
if (_ymouse >= 38 && _ymouse < 58)
return (activeButton.btnSub1);
else if (_ymouse >= 58 && _ymouse < 78)
return (activeButton.btnSub2);
else if (_ymouse >= 78 && _ymouse < 98)
return (activeButton.btnSub3);
else if (_ymouse >= 98 && _ymouse < 118)
return (activeButton.btnSub4);
else if (_ymouse >= 118 && _ymouse < 138)
return (activeButton.btnSub5);
else if (_ymouse >= 138 && _ymouse < 158)
return (activeButton.btnSub6);
else if (_ymouse >= 158 && _ymouse < 178)
return (activeButton.btnSub7);
else if (_ymouse >= 178 && _ymouse < 198)
return (activeButton.btnSub8);
else
return (null);
} // end else if
} // End of the function
var activeButton;
var activeSub;
btnProducts.onRollOver = function ()
btnProducts.gotoAndPlay("drop down");
activeButton = btnProducts;
activeSub = null;
btnProducts.onRollOut = btnProducts.onReleaseOutside = function ()
btnProducts.gotoAndPlay("drop up");
activeButton = null;
if (activeSub != null)
activeSub.gotoAndPlay("stoparrow");
} // end if
activeSub = null;
btnProducts.onRelease = function ()
if (activeSub == btnProducts.btnSub1)
getURL("products.php");
else if (activeSub == btnProducts.btnSub2)
getURL("newreleases.php");
else if (activeSub == btnProducts.btnSub3)
getURL("controlgrips.php");
else if (activeSub == btnProducts.btnSub4)
getURL("joysticks.php");
else if (activeSub == btnProducts.btnSub5)
getURL("controlboxes.php");
else if (activeSub == btnProducts.btnSub6)
getURL("electronics.php");
else if (activeSub == btnProducts.btnSub7)
getURL("accessories.php");
else if (activeSub == btnProducts.btnSub8)
getURL("4DSystemsProducts.php");
else
getURL("products.php");
} // end else if
[/CODE]That was just an exerpt. I thought it would be all you need. Here's the entire thing (attached).
EDIT. Apparently I can't attach the fla, just the swf. Hope it helps. -
Contact form-checkbox PHP coding doesnt work
I am a beginner to web page design so i would be grateful if you can explain to me what PHP coding i would need for 'Checkbox' and where to place it in the PHP coding below. I can submit the form to my email with all the headings and the filled in forms with checkbox Yes or No.
Only problem i have is that part of the check box info appear right at the top of the email message rather than the 'Name', 'Tel', 'Email' etc..Another half of the checkbox appear where it suppose to be wih double heading as shown below. I would also like to remove the <br> from the email message. Can you also tell me how to change the colour for heading so its clear.
I have marked the checkbox code in BLUE for both HTML and PHP coding below. Sorry for the long coding. Look forward to hearing from someone. Much appreciated.
Message delivered to the email address as received:
Rear ground extension: Yes
Two-storey rear extension: Yes
Two-storey side extension: No
Loft: Yes
New Build: Yes
Other: Yes
Name: Test<br>
Email: [email protected]<br>
Contact No: 87576as<br>
Address1: addy1<br>
Address2: addy2<br>
Town: town<br>
County: county<br>
Postcode: post<br>
Property Type: Cottage<br>
Property Area: None<br>
Message:<br>
test msg
My HTML coding for the form:
<div class="contactForm">
<form id="form1" name="form1" method="post" action="test2.php">
<fieldset>
<legend><strong>Personal Information</strong></legend>
<table width="690" border="0">
<tr>
<td width="340"><p>
<label for="name" class="contactLable">Name:</label>
<input name="name" type="text" id="name" tabindex="10" size="30" />
</p></td>
<td width="340"><p>
<label for="contact_number" class="contactLable">Contact No:</label>
<input name="contact_number" type="text" id="contact_number" tabindex="20" size="30" />
</p></td>
</tr>
</table>
<table width="690" border="0">
<tr>
<td><p>
<span id="sprytextfield1">
<label for="email" class="contactLable">Email:</label>
<input name="email" type="text" id="email" tabindex="30" size="30" />
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> </p></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><strong>Project Information</strong></legend>
<p><table width="690" border="0">
<tr>
<td width="340"><p>
<label for="address1" class="contactLable">Address 1:</label>
<input name="address1" type="text" id="address1" tabindex="40" size="30" />
</p></td>
<td width="340"> <p>
<label for="address2" class="contactLable">Address 2:</label>
<input name="address2" type="text" id="address2" tabindex="50" size="30" />
</p></td>
</tr>
<tr>
<td><p>
<label for="town" class="contactLable">Town:</label>
<input name="town" type="text" id="town" tabindex="60" size="30" />
</p></td>
<td><p>
<label for="county" class="contactLable">County:</label>
<input name="county" type="text" id="county" tabindex="70" size="30" />
</p></td>
</tr>
<tr>
<td><p>
<label for="postcode" class="contactLable">Post Code:</label>
<input name="postcode" type="text" id="postcode" tabindex="80" size="10" />
</p></td>
<td> </td>
</tr>
<tr>
<td><p>
<label for="propertyType" class="contactLable">Property Type:</label>
<select name="propertyType" id="propertyType" tabindex="90">
<option>Please select</option>
<option>Detached</option>
<option>Semi-Detached</option>
<option>End of Terrace</option>
<option>Mid-Terrace</option>
<option>Flat</option>
<option>Bungalow</option>
<option>Cottage</option>
<option>Other</option>
</select>
</p></td>
<td><p>
<label for="propertyArea" class="contactLable">Property Area:</label>
<select name="propertyArea" id="propertyArea" tabindex="100">
<option>Please select</option>
<option>None</option>
<option>Listed Building</option>
<option>Conservation Area</option>
</select>
</p></td>
</tr>
</table>
</p>
</fieldset><fieldset><legend><strong>Project Type</strong></legend>
<table width="690">
<tr>
<td width="338"><label>
<input name="rearExt" type="checkbox" class="contactCheckbox" id="CheckboxGroup1_0" tabindex="110" value="rearExt"/>
Rear ground extension</label></td>
<td width="340"><input name="sideExt" type="checkbox" class="contactCheckbox" id="CheckboxGroup1_1" tabindex="120" value="sideExt"/>
Side ground extension</td>
</tr>
<tr>
<td><input name="twoStoreyRear" type="checkbox" class="contactCheckbox" id="twoStoreyRear" tabindex="130" value="twoStoreyRear"/>
Two-storey rear extension</td>
<td><input name="twoStoreySide" type="checkbox" class="contactCheckbox" id="twoStoreySide" tabindex="140" value="twoStoreySide"/>
Two-storey side extension</td>
</tr>
<tr>
<td><input name="loft" type="checkbox" class="contactCheckbox" id="loft" tabindex="150" value="loft"/>
Loft conversion </td>
<td><input name="newBuild" type="checkbox" class="contactCheckbox" id="newBuild" tabindex="160" value="newBuild"/>
New build </td>
</tr>
<tr>
<td><input name="flat" type="checkbox" class="contactCheckbox" id="flat" tabindex="170" value="flat"/>
Flat conversion</td>
<td><input name="other" type="checkbox" class="contactCheckbox" id="other" tabindex="180" value="other"/>
Other conversion</td>
</tr>
</table>
</fieldset>
<fieldset><legend><strong>Message</strong></legend>
<p>
<label for="message" class="contactLable">Your Message or Comments:</label>
<textarea name="message" id="message" cols="45" rows="5" tabindex="190"></textarea>
</p>
</fieldset>
<br />
<input type="submit" name="Sumbit" id="Sumbit" value="Submit" tabindex="200" />
</form>
</div>
PHP Coding to send to my email:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
<title>Email Form</title>
</head>
<body>
<?php
$name=addslashes($_POST['name']);
$contact_number=addslashes($_POST['contact_number']);
$email=addslashes($_POST['email']);
$address1=addslashes($_POST['address1']);
$address2=addslashes($_POST['address2']);
$town=addslashes($_POST['town']);
$county=addslashes($_POST['county']);
$postcode=addslashes($_POST['postcode']);
$propertyType=addslashes($_POST['propertyType']);
$propertyArea=addslashes($_POST['propertyArea']);
$rearExt=($_POST['rearExt'])?"Rear ground extension: Yes":"Rear ground extension: No";
$sideExt=($_POST['sideExt'])?"Side ground extension: Yes":"Side ground extension: No";
$twoStoreyRear=($_POST['twoStoreyRear'])?"Two-storey rear extension: Yes":"Two-storey rear extension: No";
$twoStoreySide=($_POST['twoStoreySide'])?"Two-storey side extension: Yes":"Two-storey side extension: No";
$loft=($_POST['loft'])?"Loft: Yes":"Loft: No";
$newBuild=($_POST['newBuild'])?"New Build: Yes":"New Build: No";
$flat=($_POST['flat'])?"Flat: Yes":"Flat: No";
$other=($_POST['other'])?"Other: Yes":"Other: No";
$msg.="\n$rearExt\n$wsideExt\n$twoStoreyRear\n$twoStoreySide\n$loft\n$newBuild\n$wflat\n$ other";
$message=addslashes($_POST['message']);
// you can specify which email you want your contact form to be emailed to here
$toemail = "[email protected]";
$subject = "From Website Test";
$headers = "MIME-Version: 1.0\n"
."From: \"".$name."\" <".$email.">\n"
."Content-type: text/html; charset=iso-8859-1\n";
$body = "Name: ".$name."<br>\n"
."Email: ".$email."<br>\n"
."Contact No: ".$contact_number."<br>\n"
."Address1: ".$address1."<br>\n"
."Address2: ".$address2."<br>\n"
."Town: ".$town."<br>\n"
."County: ".$county."<br>\n"
."Postcode: ".$postcode."<br>\n"
."Property Type: ".$propertyType."<br>\n"
."Property Area: ".$propertyArea."<br>\n"
."Rear ground extension: ".$rearExt."<br>\n"
."Side ground extension: ".$sideExt."<br>\n"
."Two-storey rear extension: ".$twoStoreyRear."<br>\n"
."Two-storey side extension: ".$twoStoreySide."<br>\n"
."Loft conversion: ".$loft."<br>\n"
."New build: ".$newBuild."<br>\n"
."Flat: ".$flat."<br>\n"
."Other: ".$other."<br>\n"
."Message:<br>\n"
.$message;
if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
echo "That is not a valid email address. Please return to the"
." previous page and try again.";
exit;
mail($toemail, $subject, $body, $msg, $headers);
echo "Thanks for submitting your comments";
?>
</body>
</html>Dear David
Thank you so much for the clear explanation. I have been using Lynda.com Dreamweaver CS5 tutorial. I found the coding for checkbox through search and added to the coding from Lynda.com tutorial.
I made few changes to the coding by removing:
$msg = "$rearExt<br>\r\n$sideExt<br>\r\n$twoStoreyRear<br>\r\n
$twoStoreySide<br>\r\n$loft<br>\r\n$newBuild<br>\r\n$flat<br>\r\n$other\r\n";
as the email message shows the results from the checkbox twice.
I also removed the <br> from:
$body = "Name: $name<br>\r\n
Email: $email<br>\r\n
Contact No: $contact_number<br>\r\n
Other: $other\r\n
Message:\r\n
$message";
I have add the result and the PHP coding you have helped to fixed for anyone needing a working PHP code containing Text Fields, Drop Down List, Checkbox and Text Area. Many thanks for all your help. If you have a coding to change the heading text colour I very much appericate it.
Message sent to email:
From: Name test <[email protected]>
Content-type: text/html; charset=iso-8859-1
Name: Name test
Email: [email protected]
Contact No: 0123456789
Address1: addy1
Address2: addy2
Town: T
County: C
Postcode: P/C
Property Type: End of Terrace
Property Area: Listed Building
Rear ground extension: Rear ground extension: No
Side ground extension: Side ground extension: No
Two-storey rear extension: Two-storey rear extension: Yes
Two-storey side extension: Two-storey side extension: No
Loft conversion: Loft conversion: No
New build: New Build: No
Flat: Flat: Yes
Other: Other: No
Message:
Test message
PHP coding for customer contact page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
<title>Email Form</title>
</head>
<body>
<?php
$name=$_POST['name'];
$contact_number=$_POST['contact_number'];
$email=$_POST['email'];
$address1=$_POST['address1'];
$address2=$_POST['address2'];
$town=$_POST['town'];
$county=$_POST['county'];
$postcode=$_POST['postcode'];
$propertyType=$_POST['propertyType'];
$propertyArea=$_POST['propertyArea'];
$rearExt= isset($_POST['rearExt'])?"Rear ground extension: Yes":"Rear ground extension: No";
$sideExt= isset($_POST['sideExt'])?"Side ground extension: Yes":"Side ground extension: No";
$twoStoreyRear= isset($_POST['twoStoreyRear'])?"Two-storey rear extension: Yes":"Two-storey rear extension: No";
$twoStoreySide= isset($_POST['twoStoreySide'])?"Two-storey side extension: Yes":"Two-storey side extension: No";
$loft= isset($_POST['loft'])?"Loft conversion: Yes":"Loft conversion: No";
$newBuild= isset($_POST['newBuild'])?"New Build: Yes":"New Build: No";
$flat= isset($_POST['flat'])?"Flat: Yes":"Flat: No";
$other= isset($_POST['other'])?"Other: Yes":"Other: No";
$message=$_POST['message'];
// you can specify which email you want your contact form to be emailed to here
$toemail = "[email protected]";
$subject = "From Website Test";
$headers = "MIME-Version: 1.0\r\n
From: $name <".$email.">\r\n
Content-type: text/html; charset=iso-8859-1";
$body = "Name: $name\r\n
Email: $email\r\n
Contact No: $contact_number\r\n
Address1: $address1\r\n
Address2: $address2\r\n
Town: $town\r\n
County: $county\r\n
Postcode: $postcode\r\n
Property Type: $propertyType\r\n
Property Area: $propertyArea\r\n
Rear ground extension: $rearExt\r\n
Side ground extension: $sideExt\r\n
Two-storey rear extension: $twoStoreyRear\r\n
Two-storey side extension: $twoStoreySide\r\n
Loft conversion: $loft\r\n
New build: $newBuild\r\n
Flat: $flat\r\n
Other: $other\r\n
Message:\r\n
$message";
if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
echo "That is not a valid email address. Please return to the"
." previous page and try again.";
exit;
mail($toemail, $subject, $body, $headers);
echo "Thanks for submitting your message";
?>
</body>
</html> -
Need your help in Remodeling concept
Hi Gurus need your help in time estimations
I have a cube with data and now I need to add 10 new info objects to the cube which are including Date fields (BUDAT, BLDAT) these 10 fields will be populated to the cube from a Z table in ECC as we donu2019t have these fields in the cube we have to go for remodeling of the cube
My client requires how much time it will take to complete this
Now I want to know how much time it would take to do this (if any customer exits and user exits are required) and addition if new fields will have any effect on the current queries
Please advice in this
Thank youThe time taken will depends on a lots of factor like server speed, available memory, background jobs etc. Apart from this, the time will also depends on how much the cube is filled i.e. the no. of records in the cube. Its very abstract to tell you the exact time taken for this. But, please make sure that you have the backup of the cube which you are going to re-model. T0 say, I think 3-4 hours should be ok for the remodelling.
Thanks.
Shambhu -
Coded UI Text not adding correctly to textbox
This error results when I try to do record/playback in Coded UI Test to add a # to phone # textbox.
Can anyone please explain what I should do to resolve?
Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException: Cannot perform 'SetProperty of Text with value "3125551212"' on the control. Additional Details:
TechnologyName: 'Web'
ControlType: 'Edit'
TagName: 'INPUT'
Id: 'corpForm_txtPhoneCorp_I'
Name: 'corpForm$txtPhoneCorp'
---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0xF004F006
Result StackTrace:
at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.SetValueAsEditBox(String bstrNewValue, Int32 nSetValueAsEditBoxFlag)
at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.SetValueAsEditBox(String value, Boolean isEncoded, Int32 flag)
at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.SetValueAsEditBox(String value, Boolean isEncoded)
at Microsoft.VisualStudio.TestTools.UITesting.TechnologyElementPropertyProvider.SetValueAsEditBox(UITestControl uiControl, String value, Boolean isEncoded, Boolean useCopyPaste)
at Microsoft.VisualStudio.TestTools.UITesting.HtmlPropertyProvider.SetPropertyValue(UITestControl uiControl, String propertyName, Object value)
at Microsoft.VisualStudio.TestTools.UITesting.UITestPropertyProvider.SetPropertyValueWrapper(UITestControl uiControl, String propertyName, Object value)
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyValue(String propertyName, Object propertyValue)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)
at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(Exception exception, IPlaybackContext context)
at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(Exception exception, String actionName, UITestControl uiControl)
at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(Exception exception, String actionName, Object parameterValue, UITestControl uiControl)
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyValue(String propertyName, Object propertyValue)
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyPrivate(String propertyName, Object value)
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass3e.<SetProperty>b__3d()
at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetProperty(String propertyName, Object value)
at Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlEdit.set_Text(String value)Hi QAcodedui,
Based on your issue, you mean that when you record the textbox UI action with input a phone number text value in the textbox control and then you playback this textbox UI action, it failed for coded UI test, am I right?
If yes, I tried to add a simple textbox control in a windows form app and then I record the textbox UI action using coded UI test builder. I found that I can playback this textbox UI action successfully for coded UI test.
So if you are handing code for this textbox UI action in coded UI test, I suggest you could try to use the coded UI test builder to record and playback this textbox UI action check this issue again.
In addition, I suggest you could try to add the DrawHighlight method check whether the textbox control is found correctly.
If you are able to see cursor is highlight in the txt field it means controls is identified without error. Then I suggest you could try to add the following code for the textbox control.
For example, you can add the SendKeysAsScanCode method or the SkipSetPropertyVerification method check this issue.
(1) Playback.PlaybackSettings.SendKeysAsScanCode = true; Keyboard.SendKeysDelay = 10;
(2) Playback.PlaybackSettings.SkipSetPropertyVerification = true;
Or you can try to add more searchproperties for this textbox control and then check this issue.
Refernece:
http://blogs.msdn.com/b/tapas_sahoos_blog/archive/2011/11/07/troubleshooting-record-and-playback-issues-in-coded-ui-test.aspx
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to set/get the values thru Wedbynpro coding for User mapping fields
Hi All
In system object we have the user mapping fields like District,city,plant,Salesmanager.
now we want to set/get the values of these usermapping fields of system object thru webdynpro coding...
if anybody have sample codes of the same then it would be great help to me
Thanks in advance
Thanks
Trisha RaniHi Kavitha
Thanks for your reply
My requirement is exactly as follows.
1) i have created one portal system object in system administration and also i created usermapping fields in the system object from the usermanagement in system object.
i created the user mapping fields like Plant,SalesManager,District etc.
i also created the system alias name for the same system object
2) Now i came to persoanlize link and mapped the system object to the portal user.
while mapping to the system object we need to enter Mapping userId, Password , once we enter these values and we can also enter the values of usermapping fields which we defined while creating the system object ( for example District,Salesmanager,Plant etc)
once we enter all the values and click on save then these usermapping values to be mapped to the portal user.
3) Now my requirement is , i want to control the usermapping field values thru webdynpro coding for setting/getting the values.
I need sample code of the same.
Please let me know if u need more details on the same.
Thanks
Trisha Rani -
Not able to spy objects in ie9 using coded UI Test Builder Spy, giving exception - "Interface not registered(Exception from HRESULT:0X...."
I am not able to capture any objects of my web application using coded ui recorder. Even though it is a simple html page, coded ui is showing a message -"Interface not registered(Exception from HRESULT:0X...."
Please give me solution , why this is hapening. I am having problem with object identification. Even I am not able to identify any object in google.com.
swapnanil senguptaTechnologyName is displaying as "MSAA" . But my application is a Webapplication.If I try to spy the google .com's search field then also TechnologyName is displaying as "MSAA". Is it any configuration issue of vsts codedui.
swapnanil sengupta -
How do I share a color-coded Outlook calendar with others in my office that they can see the colors too?
Hi,
How do you color code the calendar items? From conditional formatting or from categories?
Please make sure the user has been given reviewer or higher calendar permission to view items colors in Outlook. About how to share calendar in Outlook, please refer to:
http://office.microsoft.com/en-001/outlook-help/share-an-outlook-calendar-with-other-people-HA010354420.aspx
Regards,
Winnie Liang
TechNet Community Support -
I have a Macbook Pro, the last generation, not the most recent one. It fell about 2 feet in late November 2010 and had the screen and logicboard replaced right after. A day or two after that, I started to notice that my word documents, pictures files, pdf files, itunes library and iphoto library were coded over and deleted out of nowhere. When I click on it, it says it is not a compatible format or cannot be read, etc. However, this doesn't happen all the time and not with every file. I could open a new word document and begin it today, and tomorrow it will not be retreavable, but I have a document on my desktop that has been there since January and can still be opened, so this happens without warning.
I have taken it in to the Genius Bar at my local Apple store several times with this problem, and they say they cannot see anything wrong with my computer. On my most recent visit, the lady told me to buy an external hardrive, transfer everything onto it, then do a complete clean out of my computer and reboot it I guess. If it doesn't continue, then that might have been the problem, but if it does continue, then it is obviously not that. I am really confused and I don't know if I should trust that this is the problem or just go ahead and buy a new computer all together. I don't have applecare anymore.
Help me!!! I am desperate.Does your MBP still have its original hard drive? If so, it may have started to go south. The average useful life of a notebook drive is 3-5 years, and if yours is the original, it would be about 4 years old. The drop could also have affected it.
It might be worth booting from your install disc and repairing your boot disk. It sounds like you could have some directory issues. Repair until there is nothing left to repair. If Disk Utility cannot repair the drive, you will need a stronger utility like Disk Warrior or possibly a new drive.
It also sounds like you may have some software corruption, which can happen if you have hard drive problems. Have you tried reinstalling the OS? You would want to make a backup first on an external drive and then use the archive and install feature and then update the OS.
You might want to download and run SMART Utility:
http://www.volitans-software.com/smart_utility.php
You can download the demo and run it several times for free. SMART Utility seems to be somewhat more critical than Disk Utility, and may be able to detect impending drive failure sooner.
If the drive checks out OK, then you can follow the advice you got from the genius and make a clone of your boot drive using Super Duper or carbon Copy Cloner on the external drive. You could boot from the clone you made and see how your Mac does when booted from a different drive. If all is good, you can reformat the internal drive and clone back to it.
If all you need is a replacement hard drive, then your Mac is likely worth fixing. I too have a 2007 MBP, and I replaced my hard drive right after Applecare expired, as the drive started to fail a week after Applecare ran out. I put in a Western Digital 500 GB 7200 RPM Scorpio Black, and have been running on it ever since. I have also upped my RAM to 6 GB and my OS to Lion. Not all the features of Lion work on a 2007 MBP--the trackpad does not support Gestures, and AirDrop is not supported. Even so, I expect this Mac to last me a few more years.
iFixit has instructions for replacing the hard drive, and OWC has both good RAM and kits for hard drive replacements. My gut feeling is that your hard drive is behind the weird symptoms you are experiencing.
If you are ready for a new computer, by all means get one--there are some great choices. However, you should be able to fix your old Mac for not very much money and get some more use out of it.
Good luck! -
Performance Issue in ABAP part as suggested by SE30 for the below coding
Dear Abapers,
The below coding was done by my seniors and having performance issue i.e in SE30 the abap part is consuming 98% of time.
Pl. help us to solve this situation.
With best regards,
S. Arunachalam.
the code is:
REPORT ZOBJLIST LINE-SIZE 320 NO STANDARD PAGE HEADING. "280 to 320
TABLES: MARA, MAKT, A916, KONP, MVKE, ZSAI_PARAM.
Input parameters *****************************************************
DATA IT_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.
DATA T_CLASS LIKE SCLASS OCCURS 0 WITH HEADER LINE.
DATA T_CLOBJDAT LIKE CLOBJDAT OCCURS 0 WITH HEADER LINE.
DATA FLG_COLOR TYPE C.
DATA WRK_CLASS LIKE KLAH-CLASS.
DATA WRK_PERCENT TYPE I. " Progress percentage
DATA WRK_LINES LIKE SY-TABIX. " To store the no. of lines in int.table
DATA WRK_PROGRESSTEXT(72) . " Progress indicator text
DATA : BEGIN OF IT_MATNR OCCURS 0,
MATNR LIKE MARA-MATNR,
MAKTX LIKE MAKT-MAKTX,
BISMT LIKE MARA-BISMT, "Thanikai-17.05.2002
END OF IT_MATNR.
DATA : BEGIN OF IT_HEADER OCCURS 0,
MATNR LIKE MARA-MATNR,
MAKTX LIKE MAKT-MAKTX,
CLART LIKE SCLASS-KLART,
CLASS LIKE SCLASS-CLASS,
BISMT LIKE MARA-BISMT, "Thanikai-17.05.2002
SCMNG(4) TYPE I, "Thanikai-03.10.2002
END OF IT_HEADER.
DATA : BEGIN OF IT_DETAILS OCCURS 0,
MATNR LIKE MARA-MATNR,
ZAEHL LIKE CLOBJDAT-ZAEHL,
ATNAM LIKE CLOBJDAT-ATNAM,
AUSP1 LIKE CLOBJDAT-AUSP1,
END OF IT_DETAILS.
DATA : BEGIN OF IT_DETAILS1 OCCURS 0,
MATNR LIKE MARA-MATNR,
ATNAM LIKE CLOBJDAT-ATNAM,
ZAEHL LIKE CLOBJDAT-ZAEHL,
END OF IT_DETAILS1.
DATA: IT_DETAILS2 LIKE IT_DETAILS1 OCCURS 0 WITH HEADER LINE.
DATA TMP_MATNR LIKE AUSP-OBJEK.
DATA WRK_FIELD(25).
DATA WRK_TABNAME(40). " Name of the int.table from wrk_fldname
DATA WRK_FIELDNAME(40). " Name of the fld name from wrk_fldname
DATA WRK_FLDNAME(40).
DATA T_CLOBJDAT_LINES LIKE SY-TABIX.
DATA WRK_LINES1 LIKE SY-TABIX.
DATA WRK_FIRST_TIME.
DATA TMP_STR.
DATA WRK_AUSP1 LIKE CLOBJDAT-AUSP1.
DATA: WRK_KBETR LIKE KONP-KBETR. "Thanikai-03.10.2002
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.
*PARAMETERS:
SELECT-OPTIONS:
P_MATKL FOR MARA-MATKL DEFAULT 'DIAL' OBLIGATORY NO INTERVALS.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR MATCHCODE OBJECT MAT1.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
PARAMETERS: P_CLASS LIKE KLAH-CLASS,
P_KLART LIKE KLAH-KLART DEFAULT '001' OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : REQ RADIOBUTTON GROUP RGRP ,
NREQ RADIOBUTTON GROUP RGRP .
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN.
IF NOT P_CLASS IS INITIAL.
WRK_CLASS = P_CLASS.
ELSE.
WRK_CLASS = SPACE.
ENDIF.
TOP-OF-PAGE.
IF SY-BATCH NE 'X'.
PERFORM PRINT_TOP.
ENDIF.
START-OF-SELECTION.
SET PF-STATUS '9000'.
SELECT * INTO TABLE IT_MARA
FROM MARA CLIENT SPECIFIED
WHERE MANDT = SY-MANDT
AND MATKL IN P_MATKL
AND MATNR IN S_MATNR.
DESCRIBE TABLE IT_MARA LINES WRK_LINES.
MOVE 'Selecting Material Description' TO WRK_PROGRESSTEXT.
PERFORM SAPGUI USING WRK_PERCENT WRK_PROGRESSTEXT.
LOOP AT IT_MARA.
SELECT SINGLE * FROM MAKT CLIENT SPECIFIED
WHERE MANDT = SY-MANDT
AND MATNR = IT_MARA-MATNR
AND SPRAS = 'E'.
IF SY-SUBRC = 0.
IT_MATNR-MATNR = IT_MARA-MATNR.
IT_MATNR-MAKTX = MAKT-MAKTX.
IT_MATNR-BISMT = IT_MARA-BISMT. "Thanikai-17.05.2002
ENDIF.
APPEND IT_MATNR.
CLEAR IT_MATNR.
ENDLOOP.
CLEAR WRK_LINES.
DESCRIBE TABLE IT_MATNR LINES WRK_LINES.
MOVE 'Selecting Class / characteristics for the Material'
TO WRK_PROGRESSTEXT.
PERFORM SAPGUI USING WRK_PERCENT WRK_PROGRESSTEXT.
LOOP AT IT_MATNR.
CLEAR: TMP_MATNR, T_CLASS, T_CLOBJDAT. "Thanikai-26.08.2002
REFRESH: T_CLASS, T_CLOBJDAT. "Thanikai-26.08.2002
TMP_MATNR = IT_MATNR-MATNR.
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
CLASS = WRK_CLASS
CLASSTEXT = 'X'
CLASSTYPE = '001'
CLINT = ' '
FEATURES = 'X'
LANGUAGE = SY-LANGU
OBJECT = TMP_MATNR
OBJECTTABLE = 'MARA'
KEY_DATE = SY-DATUM
INITIAL_CHARACT = 'X'
NO_VALUE_DESCRIPT = 'X'
CHANGE_SERVICE_CLF = 'X'
INHERITED_CHAR = ' '
TABLES
T_CLASS = T_CLASS
T_OBJECTDATA = T_CLOBJDAT
EXCEPTIONS
NO_CLASSIFICATION = 1
NO_CLASSTYPES = 2
INVALID_CLASS_TYPE = 3
OTHERS = 4.
IF SY-SUBRC = 0.
READ TABLE T_CLASS INDEX 1.
IT_HEADER-MATNR = IT_MATNR-MATNR.
IT_HEADER-MAKTX = IT_MATNR-MAKTX.
IT_HEADER-BISMT = IT_MATNR-BISMT."Thanikai-17.05.2002
IT_HEADER-CLART = T_CLASS-KLART.
IT_HEADER-CLASS = T_CLASS-CLASS.
PERFORM PKG_DLVY_UNIT.
APPEND IT_HEADER.
CLEAR: IT_HEADER.
Code Start by Thanikai on 16.08.2002
LOOP AT T_CLOBJDAT.
IT_DETAILS-MATNR = IT_MATNR-MATNR.
IT_DETAILS-ZAEHL = T_CLOBJDAT-ZAEHL.
IT_DETAILS-ATNAM = T_CLOBJDAT-ATNAM.
IT_DETAILS-AUSP1 = T_CLOBJDAT-AUSP1.
APPEND IT_DETAILS.
ENDLOOP.
CLEAR: IT_DETAILS.
LOOP AT T_CLOBJDAT.
IT_DETAILS1-MATNR = IT_MATNR-MATNR.
IT_DETAILS1-ATNAM = T_CLOBJDAT-ATNAM.
IT_DETAILS1-ZAEHL = T_CLOBJDAT-ZAEHL.
APPEND IT_DETAILS1.
ENDLOOP.
CLEAR: IT_DETAILS1.
DESCRIBE TABLE IT_DETAILS1 LINES T_CLOBJDAT_LINES.
IF WRK_FIRST_TIME NE 'X'.
WRK_LINES1 = T_CLOBJDAT_LINES.
WRK_FIRST_TIME = 'X'.
IT_DETAILS2[] = IT_DETAILS1[].
ELSE.
IF T_CLOBJDAT_LINES GT WRK_LINES1.
WRK_LINES1 = T_CLOBJDAT_LINES.
IT_DETAILS2[] = IT_DETAILS1[].
ENDIF.
ENDIF.
CLEAR: T_CLOBJDAT_LINES.
CLEAR: IT_DETAILS1. REFRESH: IT_DETAILS1.
ENDIF.
Code end by Thanikai on 16.08.2002
ENDLOOP.
CLEAR: WRK_LINES1, WRK_FIRST_TIME.
Print Details *********************************
PERFORM PRINT_DETAILS.
AT USER-COMMAND.
GET CURSOR FIELD WRK_FIELD.
SPLIT WRK_FIELD AT '-' INTO WRK_TABNAME WRK_FLDNAME.
IF NOT WRK_FLDNAME IS INITIAL.
CASE SY-UCOMM.
WHEN 'SORA'.
IF SY-LSIND > 0.
SY-LSIND = SY-LSIND - 1. "To print in the same window
ENDIF.
PERFORM PRINT_REPORT_ASCENDING.
WHEN 'SORD'.
IF SY-LSIND > 0.
SY-LSIND = SY-LSIND - 1. "To print in the same window
ENDIF.
PERFORM PRINT_REPORT_DESCENDING.
ENDCASE.
ELSE.
MESSAGE S000(38) WITH 'Selete Material Number / Description'.
ENDIF.
*& Form SAPGUI
text
-->P_WRK_PERCENT text *
-->P_WRK_PROGRESSTEXT text *
FORM SAPGUI USING P_WRK_PERCENT
P_WRK_PROGRESSTEXT.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = WRK_PERCENT
TEXT = WRK_PROGRESSTEXT
EXCEPTIONS
OTHERS = 1.
ENDFORM. " SAPGUI
*& Form PRINT_REPORT_ASCENDING
text
--> p1 text
<-- p2 text
FORM PRINT_REPORT_ASCENDING.
IF WRK_TABNAME = 'IT_HEADER'.
SORT IT_HEADER BY (WRK_FLDNAME).
PERFORM PRINT_TOP.
PERFORM PRINT_DETAILS.
ENDIF.
ENDFORM. " PRINT_REPORT_ASCENDING
*& Form PRINT_DETAILS
text
--> p1 text
<-- p2 text
WRK_AUSP1 width chged below from (7)to(9) by Nagaraj/MKRK 24.11.05
FORM PRINT_DETAILS.
SORT IT_HEADER BY MATNR.
IF SY-BATCH EQ 'X'.
PERFORM PRINT_TOP.
ENDIF.
IF REQ = 'X'.
LOOP AT IT_HEADER.
IF FLG_COLOR = 'X'.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
CLEAR FLG_COLOR.
ELSE.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
FLG_COLOR = 'X'.
ENDIF.
WRITE :/ SY-VLINE NO-GAP,
(18) IT_HEADER-MATNR COLOR COL_KEY NO-GAP,
SY-VLINE NO-GAP,
(40) IT_HEADER-MAKTX NO-GAP,
SY-VLINE NO-GAP,
(18) IT_HEADER-BISMT NO-GAP, "Thanikai-17.05.2002
SY-VLINE NO-GAP.
Code started by Thanikai on 16.08.2002
LOOP AT IT_DETAILS2.
CLEAR: TMP_STR, WRK_AUSP1.
IF IT_DETAILS2-ATNAM EQ 'CALIBRE'.
LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR
AND ATNAM = IT_DETAILS2-ATNAM
AND ZAEHL = IT_DETAILS2-ZAEHL.
TMP_STR = 'X'.
WRK_AUSP1 = IT_DETAILS-AUSP1.
EXIT.
ENDLOOP.
IF TMP_STR EQ 'X'.
WRITE : (9)WRK_AUSP1 NO-GAP, SY-VLINE NO-GAP.
ELSE.
WRITE : ' ', SY-VLINE NO-GAP.
ENDIF.
ELSE.
LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR
AND ATNAM = IT_DETAILS2-ATNAM.
TMP_STR = 'X'.
WRK_AUSP1 = IT_DETAILS-AUSP1.
EXIT.
ENDLOOP.
IF TMP_STR EQ 'X'.
WRITE : (9)WRK_AUSP1 NO-GAP, SY-VLINE NO-GAP.
ELSE.
WRITE : ' ', SY-VLINE NO-GAP.
ENDIF.
ENDIF.
ENDLOOP.
WRITE : (8) IT_HEADER-SCMNG NO-GAP, SY-VLINE NO-GAP.
IF SY-LINNO > 25.
IF SY-BATCH EQ 'X'.
NEW-PAGE.
PERFORM PRINT_TOP.
ENDIF.
ENDIF.
Code end by Thanikai on 16.08.2002..
ENDLOOP.
ELSEIF NREQ = 'X'.
LOOP AT IT_HEADER.
IF FLG_COLOR = 'X'.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
CLEAR FLG_COLOR.
ELSE.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
FLG_COLOR = 'X'.
ENDIF.
WRITE :/ SY-VLINE NO-GAP,
(18) IT_HEADER-MATNR COLOR COL_KEY NO-GAP,
SY-VLINE NO-GAP,
(18) IT_HEADER-BISMT NO-GAP, "Thanikai-17.05.2002
SY-VLINE NO-GAP.
Code started by Thanikai on 16.08.2002
LOOP AT IT_DETAILS2.
CLEAR: TMP_STR, WRK_AUSP1.
IF IT_DETAILS2-ATNAM EQ 'CALIBRE'.
LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR
AND ATNAM = IT_DETAILS2-ATNAM
AND ZAEHL = IT_DETAILS2-ZAEHL.
TMP_STR = 'X'.
WRK_AUSP1 = IT_DETAILS-AUSP1.
EXIT.
ENDLOOP.
IF TMP_STR EQ 'X'.
WRITE : (9)WRK_AUSP1 NO-GAP, SY-VLINE NO-GAP.
ELSE.
WRITE : ' ', SY-VLINE NO-GAP.
ENDIF.
ELSE.
LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR
AND ATNAM = IT_DETAILS2-ATNAM.
TMP_STR = 'X'.
WRK_AUSP1 = IT_DETAILS-AUSP1.
EXIT.
ENDLOOP.
IF TMP_STR EQ 'X'.
WRITE : (9)WRK_AUSP1 NO-GAP, SY-VLINE NO-GAP.
ELSE.
WRITE : ' ', SY-VLINE NO-GAP.
ENDIF.
ENDIF.
ENDLOOP.
WRITE : (8) IT_HEADER-SCMNG NO-GAP, SY-VLINE NO-GAP.
IF SY-LINNO > 25.
IF SY-BATCH EQ 'X'.
NEW-PAGE.
PERFORM PRINT_TOP.
ENDIF.
ENDIF.
Code end by Thanikai on 16.08.2002
ENDLOOP.
ENDIF.
ULINE.
ENDFORM. " PRINT_DETAILS
*& Form PRINT_REPORT_DESCENDING
text
--> p1 text
<-- p2 text
FORM PRINT_REPORT_DESCENDING.
IF WRK_TABNAME = 'IT_HEADER'.
SORT IT_HEADER BY (WRK_FLDNAME) DESCENDING.
PERFORM PRINT_TOP.
PERFORM PRINT_DETAILS.
ENDIF.
ENDFORM. " PRINT_REPORT_DESCENDING
*& Form PRINT_TOP
text
--> p1 text
<-- p2 text
IT_DETAILS2-ATNAM width chged below from 7 to 9. Nagaraj/MKRK 24.11.05
FORM PRINT_TOP.
FORMAT COLOR COL_HEADING INTENSIFIED OFF.
ULINE.
IF REQ = 'X'.
READ TABLE IT_HEADER INDEX 1.
WRITE :/ SY-VLINE NO-GAP,(17) 'Material No' ,SY-VLINE NO-GAP.
SET LEFT SCROLL-BOUNDARY.
WRITE :(39) ' Material Description', SY-VLINE NO-GAP,
(17) ' Old Matl. Number', SY-VLINE NO-GAP. "Thanikai-17.05.2002
Comments made by Thanikai on 16.08.2002
LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR.
LOOP AT IT_DETAILS2.
WRITE : (9) IT_DETAILS1-ATNAM NO-GAP,SY-VLINE NO-GAP.
WRITE : (9) IT_DETAILS2-ATNAM NO-GAP,SY-VLINE NO-GAP.
ENDLOOP.
WRITE : (8) 'Pkg.Unit' NO-GAP, SY-VLINE NO-GAP.
ELSEIF NREQ = 'X'.
READ TABLE IT_HEADER INDEX 1.
WRITE :/ SY-VLINE NO-GAP, (17) 'Material No' ,SY-VLINE NO-GAP,
(17) ' Old Matl. Number', SY-VLINE NO-GAP. "Thanikai-17.05.2002
Comments made by Thanikai on 16.08.2002
LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR.
LOOP AT IT_DETAILS2.
WRITE : (9) IT_DETAILS-ATNAM NO-GAP,SY-VLINE NO-GAP.
WRITE : (9) IT_DETAILS2-ATNAM NO-GAP,SY-VLINE NO-GAP.
ENDLOOP.
WRITE : (8) 'Pkg.Unit' NO-GAP, SY-VLINE NO-GAP.
ENDIF.
ULINE.
FORMAT RESET.
ENDFORM. " PRINT_TOP
*& Form PKG_DLVY_UNIT
text
--> p1 text
<-- p2 text
FORM PKG_DLVY_UNIT.
SELECT SINGLE KONP~KBETR INTO WRK_KBETR
FROM ( A916 INNER JOIN KONP
ON KONP~MANDT = SY-MANDT
AND KONPKNUMH = A916KNUMH
AND KONP~KOPOS = '01' ) CLIENT SPECIFIED
WHERE A916~MANDT = SY-MANDT
AND A916~KAPPL = 'V'
AND A916~KSCHL = 'PR00'
AND A916~VKORG = 'WTCH'
AND A916~VTWEG = '01'
AND A916~SPART = '01'
AND A916~MATNR = IT_MATNR-MATNR
AND A916~DATBI >= SY-DATUM
AND A916~DATAB <= SY-DATUM.
IF SY-SUBRC EQ 0.
SELECT SINGLE * FROM ZSAI_PARAM CLIENT SPECIFIED
WHERE MANDT = SY-MANDT
AND PMFID = 'ZPKG_PRICE'
AND PMVL1 = '01'.
IF SY-SUBRC EQ 0.
IF WRK_KBETR BETWEEN 1 AND ZSAI_PARAM-PMVL2.
SELECT SINGLE * FROM MVKE CLIENT SPECIFIED
WHERE MANDT = SY-MANDT
AND MATNR = IT_MATNR-MATNR
AND VKORG = 'WTCH'
AND VTWEG = '01'.
IF SY-SUBRC EQ 0.
IF MVKE-SCMNG GE 1.
IT_HEADER-SCMNG = MVKE-SCMNG.
ELSE.
In the absence of delivery unit for a material,
delivery unit is considered as one.
IT_HEADER-SCMNG = 1.
ENDIF.
ELSE.
IT_HEADER-SCMNG = 1.
ENDIF.
ELSE.
If the price for a material is either below 1 or above 2499, then
the delivery unit is considered as one.
IT_HEADER-SCMNG = 1.
ENDIF.
ELSE.
IT_HEADER-SCMNG = 1.
ENDIF.
ELSE.
In the absence of price for a material, delivery unit is
considered as one.
IT_HEADER-SCMNG = 1.
ENDIF.
CLEAR: WRK_KBETR.
ENDFORM. " PKG_DLVY_UNITThe first point would be to change the following:
LOOP AT IT_MARA.
SELECT SINGLE * FROM MAKT CLIENT SPECIFIED
WHERE MANDT = SY-MANDT
AND MATNR = IT_MARA-MATNR
AND SPRAS = 'E'.
IF SY-SUBRC = 0.
IT_MATNR-MATNR = IT_MARA-MATNR.
IT_MATNR-MAKTX = MAKT-MAKTX.
IT_MATNR-BISMT = IT_MARA-BISMT. "Thanikai-17.05.2002
ENDIF.
APPEND IT_MATNR.
CLEAR IT_MATNR.
ENDLOOP.
I would sort IT_MARA by matnr then select for all entries into new table IT_matnr and only read when you are actuallygoing to use it for your final table.
This however will not make much difference to your problem. I suggest you put more of the code into subroutines and look at the se30 output as tyo which subroutines are actually taking most of the time. Please post the results and the subroutines which take the longest.
Maybe you are looking for
-
Post processing the pulse signals
I want to do the following post processing for a digital square signal 1) How to get the time interval between two consecutive rising edges of a digital square signal
-
Hi Experts, I am using function module : SO_NEW_DOCUMENT_SEND_API1 to send email. The structure accepts 50 chars of subject line as per the parameters of the FM, is there any way to have subjetc more than 50 characters?? Thanks in advance Govind.
-
How to revert to a previous version of premiere pro cc
I udpadeted my premiere pro cc to the 7.2.1 version and premiere is not working for me at all. I was wondering if there is a way to revert back to a previous version I really need to finish a project for a client andI am not able to do that right n
-
Hello all, I've been kind of thrown into the need to learn LV quickly. I've gone through the LV 101 videos, and got a decent start....but need to learn more in-depth quickly. I'm looking maybe for a book on amazon, that will get me as a noob started
-
When is function driver of a statically enumerated device loaded?
When is function driver of a statically enumerated device loaded? The discussion below applies only to KMDF drivers for Windows Phone8.1 I'm studying a sample driver package with a software-only bus driver(sample_bus.sys, whose start type is SERVICE_