Layoutpositioning without using ap div's
hey guys
i'm having a really hard time getting a knack for layout without using absolute positoning. When i initially started learning web design, i used ap divs and everything was fairly straighforward.Just draw a rectangle, give it width, height, coordinates and there u go. unfortunately when testing it live, it didn't look so good and didnt look the same throughout. back to the drawing board. Now i'm trying to use divs but with padding, margins etc but this is very unintuitive way to build sites (to me). I had a member here even moinck up my entire site in probably one hour whereas i've been working months trying to get mine going! its been very frustrating to say the least.
can anyone give me pointers about this. Before i could mock up a site in photoshop, contruct it using ap divs and everything fits (in design view at least). i look at a site and see a header, body, footer, aside see in my mind how its going to look but then creating the style entries before the layout hhas been contructed.. lets just say it looks like magic.
so i understand to use margins and padding etc to push the designs around on a page to mock up your design, but how do you visualize this and know ahead of time to give a certain divs this much padding, or margins or any of the other style markups?
can someone explain when you use margins vs padding? both of these are ordered by Top Right Bottom Left entries? but what does
"margin: 0 auto" mean??
what is the difference between
padding and padding-top when you have T R B L entries for normal padding?
what is the diff between margin and margin-left??
padding vs padding-bottom??
what does min-height do?
margin: 0 auto mean??
what is border top:nonw do??
if someone could explain this i would greatly appreciate it.
thanks!
westwm wrote:
so i understand to use margins and padding etc to push the designs around on a page to mock up your design, but how do you visualize this and know ahead of time to give a certain divs this much padding, or margins or any of the other style markups?
The way I work is by looking at the final design (which I usually mock up in Fireworks) and break it down visually and mentally into a simple box concept. This does take a bit of getting used to because you need to think and anticipate what will happen to the design if this or that happens or if the user does this or that.
Once I have a clear idea of the box construction in my mind I then start to insert the applicable <divs>, without intially adding any css styling. At a point where I have the main <divs> on the page I then being to apply the css styling. I almost never use padding on the main <div> construction as that is a PITA because of the box-model whereby it gets added to the width of the <div>, you can soon find your mathematics are incorrect which will junk the construction very quickly. Whenever and wherever possible I'll add padding to elements withing the main <divs>. So for a simple example rather that add a 25px left and right padding to a <div> which will hold some text where I need some clear space left and right I'll add it to the paragraph or heading tags which are inserted into the <div>, much cleaner and simpler.
This really is not rocket science, once you grasp the idea it's just a series of simple boxes you are inserting onto the page everything becomes very clear.
westwm wrote:
can someone explain when you use margins vs padding? both of these are ordered by Top Right Bottom Left entries? but what does
"margin: 0 auto" mean??
This means top/bottom padding 0. auto is used to automatically calculate and evenly distrubute the left and right padding of a container, commonly used when horizontally centering a container with a specified width within another container which could be the <body> tag or another <div> etc.
westwm wrote:
what is the difference between
padding and padding-top when you have T R B L entries for normal padding?
padding-top just adds the 'top' padding so this wont work:
padding-top: 10px 3px 7px 8px;
while this will work:
padding: 10px 3px 7px 8px;
westwm wrote:
what is the diff between margin and margin-left??
padding vs padding-bottom??
Margin adds a margin to top, left, bottom, right, whereas margin-left or margin-right just specifically adds a margin left or right.
margin is added outside of the container whilst padding is added inside of the container.
So in an instance where you might want to move a <div> to the right by 50px you would use margin-left: 50px;
In an instance where you want to add 50px between the left border of a <div> and its contents you would add padding-left: 50px; (but as I explained above I almost never apply padding to a main <div> as you then have to recaculate the width of the <div> (if its specified) to account for the padding you have added.
westwm wrote:
what does min-height do?
That sets a minimum height for a container i.e.' the container will never be less than the minimum height set but if it is higher as a result of it's content it will exceed the minimum height to accomodate the content, which is what you want it to do.
westwm wrote:
what is border top:nonw do??
Don't know never come across it before - nonw
Similar Messages
-
How do I create a webpage in Dreamweaver WITHOUT using layers?
I'm reading a lot about how we should not use layers and
tables when creating a website in Dreamweaver because of something
called "absolute placement" (or something), which is the reason the
text in my website is constantly misaligned or overlapping when
opened up in Firefox. Although, I've never had this problem before
for the past three years I've been using Dreamweaver to create my
sites, which is what's most frustrating I think.
So, I guess I'm wondering how, then, do I create a webpage in
Dreamweaver WITHOUT using layers and tables? The only thing I've
been able to do w/o layers/tables is to literally hit "enter" and
"tab" continuously until the cursor is somewhere close to where I
want it to be on the page. But that seems a little old-school (for
lack of a better term) to really be the way to do it.
Also, if I've used a lot of layers/tables already in my
website, is the general recommendation for be to rebuild my site
completely w/o layers/tables, or is it feasible for me to have
someone who knows HTML just come in and fix the actual HTML code
for me to make it all work?
Ideally, I just want something to help me fix this problem
w/o having to hire someone else to come in, cause I've been working
this site for about a year now and am just now finally getting it
up online only to find that the way it looks online is not the way
it looks in Dreamweaver. I'd really really appreciate any
suggestions/advice.
Thank you so much!Hello,
The first bit of advice, which you may already be doing, it
to learn HTML
and CSS.
CSS is used to style and position elements.
Instead of adding numerous to add spacing, for
example, you can use
CSS to add margins or padding to elements to move them away
from other
elements.
Also, IMHO there is nothing wrong with using tables,
specially as you learn.
You can also use <divs> and CSS to position them (a
table-less layout).
There are a number of threads in this forum comparing them
and giving many
designer's views.
It's Dreamweaver's "Layout Mode" you should stay away
from.Use "Standard
Mode"
It creates tables with rowspanss and colspans that are very
fragile.
Something as simple as a user having a different text size
setting in their
browser than what you had in yours when you designed can make
the page break
apart.
More info:
http://apptools.com/rants/spans.php
Also, "Layers" are an older DW term for AP Divs (Absolutely
Positioned).
They can cause you a lot of frustration.
More info:
http://apptools.com:80/examples/pagelayout101.php
I would strongly suggest you take a couple of hours to do
these tutorials.
They are a great introduction to using CSS, making a
stylesheet and using
DW's "wizards".
They are very well written, illustrated and easy to follow.
I promise you will walk away with a different outlook on how
you can design
a page.
They are not intended to replace learning HTML or CSS in any
way, I just
think it will benefit you greatly seeing what you can do.
http://projectseven.com/tutorials/css/css_td/index.htm
http://projectseven.com/tutorials/css/qdmacfly/index.htm
I hope that helps.
Take care,
Tim
"darkpwca" <[email protected]> wrote in
message
news:[email protected]...
> I'm reading a lot about how we should not use layers and
tables when
> creating a
> website in Dreamweaver because of something called
"absolute placement"
> (or
> something), which is the reason the text in my website
is constantly
> misaligned
> or overlapping when opened up in Firefox. Although, I've
never had this
> problem
> before for the past three years I've been using
Dreamweaver to create my
> sites,
> which is what's most frustrating I think.
>
> So, I guess I'm wondering how, then, do I create a
webpage in Dreamweaver
> WITHOUT using layers and tables? The only thing I've
been able to do w/o
> layers/tables is to literally hit "enter" and "tab"
continuously until the
> cursor is somewhere close to where I want it to be on
the page. But that
> seems
> a little old-school (for lack of a better term) to
really be the way to do
> it.
>
> Also, if I've used a lot of layers/tables already in my
website, is the
> general recommendation for be to rebuild my site
completely w/o
> layers/tables,
> or is it feasible for me to have someone who knows HTML
just come in and
> fix
> the actual HTML code for me to make it all work?
>
> Ideally, I just want something to help me fix this
problem w/o having to
> hire
> someone else to come in, cause I've been working this
site for about a
> year now
> and am just now finally getting it up online only to
find that the way it
> looks
> online is not the way it looks in Dreamweaver. I'd
really really
> appreciate any
> suggestions/advice.
>
> Thank you so much!
> -
Is there a way to send and receive SMS on multiple cellular devices without using iMessage?
I currently own a cellular iPad mini and an iPhone 4s and would like SMS to be the same on both devices as well as my desktop.
After many months of struggling with iMessage, I decided to turn it off entirely. I discovered that my best friend did not receive dozens of my texts over the span of a few months (I compared our message history side by side). Seems like it had something to do with traveling in and out of wifi zones or possibly conflicts between our two carriers, ATT and Verizon. Regardless, I am not willing to dive into iMessage fully until this gets sorted out. Further, SMS is the standard message format for everyone outside of the Apple sphere, and I do not feel comfortable lumping them together into one app. If I decide to switch to Android, will all of my contacts with iPhones continue sending me iMessages?
Thank you for your help!Is there a way to send and receive SMS on multiple cellular devices without using iMessage?
Search the iTunes App Store for any 3rd party SMS apps that may be available.
If I decide to switch to Android, will all of my contacts with iPhones continue sending me iMessages?
Android phones don't receive iMessages, they can recieve SMS messages sent through the iOS Messages app. The app that your contacts choose to use to send you messages is completely up to them. -
Any way to open new browser window without using image maps?
Is there any way to open new browser window without using image maps? My code works fine in Firefox, but not in IE. There are 2 problems in IE: 1st is that the thumbnail images move up within their own borders & 2nd that when you click on an image it does open up a new browser window, but also redirects to the index page (in this case it's just a placeholder index page - the new one I've called index_new.html for the time being).
Here is the link:
http://www.susieharperdesigns.com/gallery_beads.html
Any help is greatly appreciated.Your missing a value on the HREF. In your code you have this:
<area shape="rect" coords="-24,-9,106,144" href=" " onclick="MM_openBrWindow('gallery_bead1.html','','width=255,height=360')" />
</map></div>
and it should be this:
<area shape="rect" coords="-24,-9,106,144" href="javascript:void()" onclick="MM_openBrWindow('gallery_bead1.html','','width=255,height=360')" />
</map></div>
If you fix the code on all your beads, it should work.
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
http://alt-web.blogspot.com -
Question about setting opacity in DW Cs6, without using rgba
Hello,
I prefer not to use html5/css3 until there are no more windows xp accessing the internet. However, the html5/css3 functions are pretty nifty and I would like to find a ie8 friendly way of doing similar stuff. I would like to set the opacity of my background colors between my <div></div> and not use rgba, but rather hex, but NOT change the text color at all. I would prefer to do it in the css editor rather than hand coding if possible. Is there a way to do this?
I'm new to the new stuff. Last time I built a site was back in 2007 using Frontpage 2003:)
ThanksWithout using rgba, you would be stuck with the opacity atribute if wanted to just use css. The problem with the opacity attribute (and filter for IE) is they affect the entire html element they are applied to and its contents.
The only way to have a background with some opacity/transparency without using rgba for the background-color attribute is to use what Gramps points out. Create an image in Photoshop, add your color to a new layer, drop the opacity of the layer to the level you want. Remove any background layer (so you have just the checkerboard background with your partially transparent color over the top of it) then save it as a PNG-24. -
How do close a Flash player without using a close button?
Can you tell me how to launch a Flash video after/as the home
page loads and then make the player disappear after the video has
finished playing without using a close button?
Here’s an example where the player remains after the
video has played. -
http://www.hansenauto.com/
Do you have any design (positioning) suggestions on how to
accomplish this task?Once the video is complete, you could make a call to a
javascript function that hides the div container of the Flash
Object using ExternalInterface. If you are using FLVPlayback
component, create a listener for its complete event. If you are
using NetStream/NetConnect, listen for the Buffer.Play.Stop status
event. -
Print Crystal Report directly from C# without using Report Viewer
Hello All,
I need to print a crystal report directly to the printer without using ReportViewer in C#. I've a CrystalReport2(belowCode) which requires a query (Select * from JobHeader where JobNumber='J012345') to display all the data. I'm stuck with database connection
and putting all the data to DataAdapter in C# (Below Code). I also have 8 subreports in my CrystalReport2. Can somebody please give me hand on this? I'm struggling with it. Thanks.
Regards
using CrystalDecisions.CrystalReports.Engine;
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace csharp_win_printtoprinter
/// <summary>
/// Summary description for Form1
/// </summary>
public class Form1 : System.Windows.Forms.Form
//CR Variables
ReportDocument crReportDocument;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.PrintDialog printDialog1;
private System.Windows.Forms.Button button2;
private System.Drawing.Printing.PrintDocument printDocument1;
private CrystalDecisions.Windows.Forms.CrystalReportViewer crystalReportViewer1;
private CrystalReport1 CrystalReport11;
private Chart Chart1;
/// <summary>
/// Required designer variable
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
// Required for Windows Form Designer support
InitializeComponent();
// TODO: Add any constructor code after InitializeComponent call
/// <summary>
/// Clean up any resources being used
/// </summary>
protected override void Dispose( bool disposing )
if( disposing )
if (components != null)
components.Dispose();
base.Dispose( disposing );
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor
/// </summary>
private void InitializeComponent()
this.button1 = new System.Windows.Forms.Button();
this.printDialog1 = new System.Windows.Forms.PrintDialog();
this.button2 = new System.Windows.Forms.Button();
this.printDocument1 = new System.Drawing.Printing.PrintDocument();
this.crystalReportViewer1 = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
this.Chart1 = new csharp_win_printtoprinter.Chart();
this.CrystalReport11 = new csharp_win_printtoprinter.CrystalReport1();
this.SuspendLayout();
// button1
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(32, 56);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(160, 104);
this.button1.TabIndex = 0;
this.button1.Text = "Print Report No Choose Printer";
this.button1.Click += new System.EventHandler(this.button1_Click);
// button2
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(272, 56);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(160, 104);
this.button2.TabIndex = 1;
this.button2.Text = "Choose Printer";
this.button2.Click += new System.EventHandler(this.button2_Click);
// crystalReportViewer1
this.crystalReportViewer1.ActiveViewIndex = 0;
this.crystalReportViewer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.crystalReportViewer1.Cursor = System.Windows.Forms.Cursors.Default;
this.crystalReportViewer1.Location = new System.Drawing.Point(47, 188);
this.crystalReportViewer1.Name = "crystalReportViewer1";
this.crystalReportViewer1.ReportSource = this.CrystalReport11;
this.crystalReportViewer1.Size = new System.Drawing.Size(903, 296);
this.crystalReportViewer1.TabIndex = 2;
// Form1
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(1164, 505);
this.Controls.Add(this.crystalReportViewer1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
#endregion
/// <summary>
/// The main entry point for the application
/// </summary>
[STAThread]
static void Main()
Application.Run(new Form1());
private void button1_Click(object sender, System.EventArgs e)
crReportDocument = new ReportDocument();
//Create an instance of a report
crReportDocument = new CrystalReport2();
//Use error handling in case an error occurs
try
//Set the printer name to print the report to. By default the sample
//report does not have a defult printer specified. This will tell the
//engine to use the specified printer to print the report. Print out
//a test page (from Printer properties) to get the correct value.
System.Drawing.Printing.PrintDocument printDocument = new System.Drawing.Printing.PrintDocument();
crReportDocument.PrintOptions.PrinterName = printDocument.PrinterSettings.PrinterName;
//Start the printing process. Provide details of the print job
//using the arguments.
crReportDocument.PrintToPrinter(0 ,true , 1, 1);
//Let the user know that the print job is completed
MessageBox.Show("Report finished printing!");
catch(Exception err)
MessageBox.Show(err.ToString(), "Unexpected exception");
private void Form1_Load(object sender, System.EventArgs e)
private void button2_Click(object sender, System.EventArgs e)
//Open the PrintDialog
this.printDialog1.Document = this.printDocument1;
DialogResult dr = this.printDialog1.ShowDialog();
if(dr == DialogResult.OK)
//Get the Copy times
int nCopy = this.printDocument1.PrinterSettings.Copies;
//Get the number of Start Page
int sPage = this.printDocument1.PrinterSettings.FromPage;
//Get the number of End Page
int ePage = this.printDocument1.PrinterSettings.ToPage;
string PrinterName = this.printDocument1.PrinterSettings.PrinterName;
crReportDocument = new ReportDocument();
//Create an instance of a report
crReportDocument = new Chart();
try
//Set the printer name to print the report to. By default the sample
//report does not have a defult printer specified. This will tell the
//engine to use the specified printer to print the report. Print out
//a test page (from Printer properties) to get the correct value.
crReportDocument.PrintOptions.PrinterName = PrinterName;
//Start the printing process. Provide details of the print job
//using the arguments.
crReportDocument.PrintToPrinter(nCopy, false, sPage, ePage);
//Let the user know that the print job is completed
MessageBox.Show("Report finished printing!");
catch(Exception err)
MessageBox.Show(err.ToString());1. This is a VB.Net forum not a Visual C# forum. For Visual C# questions try this forum.
Visual C#
2. Crystal Reports are not supported by Microsoft. Therefore, unless somebody responding in the Visual C# forum has experience with whichever version of Crystal Reports you are using, you will probably not receive an answer in the Visual C# forum. SAP has
their own assistance for Crystal Reports using Visual Studio. You can try to find an appropriate forum to ask questions in at SAP in the below link.
SAP Community Network
La vida loca -
How do I share my iTunes library to an iPad without using "Home Sharing"?
I have set up my iTunes library to be shared with others over our home network. This is the "Share your library" option, and NOT "Home Sharing" since my wife has her own Apple ID and I, unfortunatly, have 2. She was wanting to listen to our music on her iPad but could not figure out how to access the shared library. The "Music" app (click more, select library) only seems to work for Home Shared libraries. (In fact, I had tried Home Sharing first and when I turned it off, all of the buttons at the bottom of the Music app's screen disappeared - note: she has no music stored on the iPad.)
So, how can an iPad access a shared iTunes music library without using Home Sharing?
(iPad 2, iOS 6; Mac 10.8, iTunes 10 because 11 totally inhibits my ability to use my iPod the way I want.)-> Home Sharing is different than logging into the iTunes store.
You enable Home Sharing using one AppleID. Doesn't matter which you use but all devices must use the same AppleID for Home Sharing. -
Consuming a webservice in ABAP ECC 6.0 without using XI/ PI
Hi Experts,
I wanted to consume an external webservice without using XI / PI.After doing my homework and search on sdn I came to know that we can consume webservices in ABAP using proxies using SE80(Enterprise Services).
I am trying to create a client proxy with the URL of webservice.It asks me the option to choose between URL or HTTP.
I am selecting URL and in the second screen it asks about the package details and after that it finishes.Later I get an error message stating "NO VENDOR SPECIFIED".Its not allowing me to create a proxy.
So, here are my questions.
Does anyone faced the same kind of problem?
Can we really consume a webservice without using XI / PI or any other middleware?
Is it possible to consume the webservice only with URL or WSDL file ?
Please let me know the exact process.
Thanks in Advance.
Shanker Pandey.Hi Martin,
Please check these following links. Though you have reported already, these may help
Proxy Object generation error using Wizard for Web Service Consumption
Also, please have a look @ /people/thomas.jung/blog/2006/03/13/develop-a-web-service-that-sends-an-email--in-abap-netweaver-04s
Hope this helps,
Karthik -
How to find out the list of patches applied without using inventory?
Hi,
I have been asked this question once.
How will you find out the list of patches applied to Oracle Database Home without using commands like opatch lsinventory -detal etc...
I think registry$history is a view from where we can find out the list of patches applied.
But I think it will not include all the bug fixes,stand alone or one-off patches.It will mainly list out the CPU patches applied(correct me if I am wrong).
Thanks,
RushiHi;
Thanks Helios,
Your welcome
Could you tell me how do you all senior people manage to find metalink note for almost everything?There is nothing special, For me I just make more search at metalink than googling so after sometimes you started to notice which note could be related wiht issues more clearly.. Just keep searching at metalink and focus what you are searching only.. ;)
If you could guide me I can do it my self and stop bothering you for some silly doubts.You dont bother me and also I belive the other forum users ;) We are also learning new information wiht user questions ;)
Regard
Helios -
I lost my iPhone device, how can I get my data back on another one without using an iCloud backup just back up on i Tunes, Please Help.??
You can find the backup files and then copy them to a safe place if you are worrying about this.
iTunes places the backup files in these places:
Mac: ~/Library/Application Support/MobileSync/Backup/
The "~" represents your Home folder. If you don't see Library in your Home folder, hold Option and click the Go menu.
Windows Vista, Windows 7, and Windows 8: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
To quickly access the AppData folder, click Start. In the search bar, type %appdata%, then press Return.
Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
To quickly access the Application Data folder, click Start, then choose Run. In the search bar, type %appdata%, then click OK. -
URGENT:HOW TO COMBINE CLUSTER AND TRANSPARENT TABLE..WITHOUT USING FOR ALL
how can we join bkpf and bseg without using FOR ALL ENTRIES.HOW DO I COMBINE THE 2 TABLES SO THAT I GET BETTER PERFORMANCE.
START-OF-SELECTION.
SELECT bukrs belnr gjahr budat FROM bkpf INTO TABLE i_bkpf
WHERE bukrs = p_bukrs AND "COMPANY CODE
gjahr = p_gjahr AND "FISCAL YEAR
budat IN s_budat. "POSTING DATE IN DOC
IF sy-subrc = 0.
SELECT bukrs belnr gjahr hkont shkzg dmbtr FROM bseg INTO TABLE
i_bseg FOR ALL ENTRIES IN i_bkpf
WHERE bukrs = i_bkpf-bukrs AND "COMPANY CODE
belnr = i_bkpf-belnr AND "A/CING DOC NO
gjahr = i_bkpf-gjahr AND "FISCAL YEAR
hkont = p_hkont. "General Ledger Account"
IF sy-subrc = 0.
SELECT bukrs belnr gjahr hkont shkzg dmbtr FROM bseg INTO TABLE
i_bseg1 FOR ALL ENTRIES IN i_bseg
WHERE bukrs = i_bseg-bukrs AND "COMPANY CODE
belnr = i_bseg-belnr AND "A/CING DOC NO
gjahr = i_bseg-gjahr. "FISCAL YEAR
ENDIF.
ENDIF.
IF NOT i_bseg1[] IS INITIAL.
LOOP AT i_bseg1.
IF i_bseg1-hkont = p_hkont AND i_bseg1-shkzg = 'S'.
v_sumgl = v_sumgl + i_bseg1-dmbtr.
ELSEIF i_bseg1-hkont = p_hkont AND i_bseg1-shkzg = 'H'.
v_sumgl = v_sumgl - i_bseg1-dmbtr.
ELSEIF i_bseg1-hkont NE p_hkont .
IF i_bseg1-shkzg = 'H'.
i_bseg1-dmbtr = - i_bseg1-dmbtr.
ENDIF.
i_alv-hkont = i_bseg1-hkont.
i_alv-dmbtr = i_bseg1-dmbtr.
APPEND i_alv.
v_sumoffset = v_sumoffset + i_bseg1-dmbtr.
ENDIF.
ENDLOOP.
regards
Essam.([email protected])Hi Friend,
I see your code.. there is no other way than using for all entries for your situation.. how ever i saw ur code and a small recommandation in the change of code.
SELECT bukrs belnr gjahr budat FROM bkpf INTO TABLE i_bkpf
WHERE bukrs = p_bukrs AND "COMPANY CODE
gjahr = p_gjahr AND "FISCAL YEAR
budat IN s_budat. "POSTING DATE IN DOC
IF sy-subrc = 0.
if not p_hkont is initial.
SELECT bukrs belnr gjahr hkont shkzg dmbtr FROM bseg INTO TABLE
i_bseg1 FOR ALL ENTRIES IN i_bkpf
WHERE bukrs = i_bseg-bukrs AND "COMPANY CODE
belnr = i_bseg-belnr AND "A/CING DOC NO
gjahr = i_bseg-gjahr. "FISCAL YEAR
ENDIF.
i_bseg[] = i_bseg[]1.
delete i_bseg where hkont ne p_hkont.
else.
Your existing logic...
endif.
In this way you can avoide writing two selects on bseg..
Thanks
Mahesh -
Hi All,
I need to get the "Creation Script" of the existing table using c# and without using SMO dlls (is it possible? I don't know).
I.e. In SQL Management Studio -> right click on any table -> Script table as -> Create To - > open in the new query editor window. This will give you the schema of the table with the constraints of the table.
For E.g. In Northwind database, for the table "Categories", I would like to get it as show below
USE [Northwind]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Categories](
[CategoryID] [int] IDENTITY(1,1) NOT NULL,
[CategoryName] [nvarchar](15) NOT NULL,
[Description] [ntext] NULL,
[Picture] [image] NULL,
CONSTRAINT [PK_Categories] PRIMARY KEY CLUSTERED
[CategoryID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
I would like to get the same schema using c#. Please help.
Thanks & Regards,
Kalai.SMO is the easiest way to get this. This is what Management Studio uses. If you can't use SMO, get a Profiler trace of the queries that SMO executes when generating the script and execute the same using ADO.NET.
Regards,
Farooq Mahmud
Support Escalation Engineer
• Microsoft Health Solutions Group -
Help needed Displaying ALV Secondary list without using oops concept
Hi Experts
Help needed Displaying ALV Secondary list without using oops concept.
its urgent
regds
rajasekharhi chk this code
******************TABLES DECLARATION*****************
TABLES : VBAP,MARA.
*****************TYPE POOLS**************************
TYPE-POOLS : SLIS.
****************INTERNAL TABLES**********************
DATA : BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
END OF IT_VBAP.
****************TEMPORARY VARIABLES******************
DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
*****************FIELD CATALOG***********************
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
****************LAYOUT*******************************
DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
***************VARIANT*******************************
DATA : G_VARIANT LIKE DISVARIANT.
****************SAVE*********************************
DATA : G_SAVE(1) TYPE C.
*****************EVENTS******************************
DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
G_EVENTS TYPE SLIS_T_EVENT.
******************PF STATUS**************************
DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
******************USER COMMAND************************
DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
R_UCOMM LIKE SY-UCOMM.
****************SELECTION SCREEN************************
SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
***************AT SELECTION SCREEN*********************
AT SELECTION-SCREEN.
PERFORM VALIDATE.
**************START-OF-SELECTION**************************
START-OF-SELECTION.
PERFORM GET_DETAILS.
PERFORM FIELDCAT.
PERFORM LAYOUT.
PERFORM VARIANT.
PERFORM SAVE.
PERFORM EVENTS.
PERFORM ALV_DISPLAY.
*********************FORMS*******************************************
*& Form validate
text
--> p1 text
<-- p2 text
FORM VALIDATE .
SELECT SINGLE VBELN
FROM VBAP
INTO V_VBELN
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'enter valid vbeln'.
ENDIF.
ENDFORM. " validate
*& Form get_details
text
--> p1 text
<-- p2 text
FORM GET_DETAILS .
SELECT VBELN
POSNR
MATNR
FROM VBAP
INTO TABLE IT_VBAP
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'no details found'.
ENDIF.
ENDFORM. " get_details
*& Form fieldcat
text
--> p1 text
<-- p2 text
FORM FIELDCAT .
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-OUTPUTLEN = 10.
WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'POSNR'.
WA_FIELDCAT-OUTPUTLEN = 6.
WA_FIELDCAT-SELTEXT_L = 'ITEM'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-OUTPUTLEN = 18.
WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. " fieldcat
*& Form LAYOUT
text
--> p1 text
<-- p2 text
FORM LAYOUT .
WA_LAYOUT-ZEBRA = 'X'.
ENDFORM. " LAYOUT
*& Form VARIANT
text
--> p1 text
<-- p2 text
FORM VARIANT .
CLEAR G_VARIANT.
G_VARIANT-REPORT = SY-REPID.
ENDFORM. " VARIANT
*& Form SAVE
text
--> p1 text
<-- p2 text
FORM SAVE .
CLEAR G_SAVE.
G_SAVE = 'A'.
ENDFORM. " SAVE
*& Form EVENTS
text
--> p1 text
<-- p2 text
FORM EVENTS .
CLEAR XS_EVENTS.
XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENTS-FORM = 'TOP_OF_PAGE'.
APPEND XS_EVENTS TO G_EVENTS.
ENDFORM. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
WRITE :/ ' INTELLI GROUP'.
ENDFORM. "TOP_OF_PAGE
*& Form ALV_DISPLAY
text
--> p1 text
<-- p2 text
FORM ALV_DISPLAY .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = PF_STATUS
I_CALLBACK_USER_COMMAND = USER_COMMAND
I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = G_SAVE
IS_VARIANT = G_VARIANT
IT_EVENTS = G_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
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_VBAP
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. " ALV_DISPLAY
*& Form SET_PF_STATUS
text
FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'Z50651_PFSTATUS' EXCLUDING EXTAB.
ENDFORM. "SET_PF_STATUS
*& Form SET_USER_COMMAND
text
FORM SET_USER_COMMAND USING R_UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'DC'.
READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
SELECT SINGLE MTART
FROM MARA
INTO V_MTART
WHERE MATNR = IT_VBAP-MATNR.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
ELSE.
WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
WRITE :/ 'MATERIAL TYPE :' , V_MTART.
ENDIF.
ENDIF.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'CLOSE'.
CALL TRANSACTION 'SE38'.
ENDCASE.
REPORT Z_ALV_INTERACTIVE MESSAGE-ID ZMSG_50651
LINE-SIZE 100
LINE-COUNT 60
NO STANDARD PAGE HEADING.
******************TABLES DECLARATION*****************
TABLES : VBAP,MARA.
*****************TYPE POOLS**************************
TYPE-POOLS : SLIS.
****************INTERNAL TABLES**********************
DATA : BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
END OF IT_VBAP.
****************TEMPORARY VARIABLES******************
DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
*****************FIELD CATALOG***********************
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
****************LAYOUT*******************************
DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
***************VARIANT*******************************
DATA : G_VARIANT LIKE DISVARIANT.
****************SAVE*********************************
DATA : G_SAVE(1) TYPE C.
*****************EVENTS******************************
DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
G_EVENTS TYPE SLIS_T_EVENT.
******************PF STATUS**************************
DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
******************USER COMMAND************************
DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
R_UCOMM LIKE SY-UCOMM.
****************SELECTION SCREEN************************
SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
***************AT SELECTION SCREEN*********************
AT SELECTION-SCREEN.
PERFORM VALIDATE.
**************START-OF-SELECTION**************************
START-OF-SELECTION.
PERFORM GET_DETAILS.
PERFORM FIELDCAT.
PERFORM LAYOUT.
PERFORM VARIANT.
PERFORM SAVE.
PERFORM EVENTS.
PERFORM ALV_DISPLAY.
*********************FORMS*******************************************
*& Form validate
text
--> p1 text
<-- p2 text
FORM VALIDATE .
SELECT SINGLE VBELN
FROM VBAP
INTO V_VBELN
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'enter valid vbeln'.
ENDIF.
ENDFORM. " validate
*& Form get_details
text
--> p1 text
<-- p2 text
FORM GET_DETAILS .
SELECT VBELN
POSNR
MATNR
FROM VBAP
INTO TABLE IT_VBAP
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'no details found'.
ENDIF.
ENDFORM. " get_details
*& Form fieldcat
text
--> p1 text
<-- p2 text
FORM FIELDCAT .
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-OUTPUTLEN = 10.
WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'POSNR'.
WA_FIELDCAT-OUTPUTLEN = 6.
WA_FIELDCAT-SELTEXT_L = 'ITEM'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_VBAP'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-OUTPUTLEN = 18.
WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. " fieldcat
*& Form LAYOUT
text
--> p1 text
<-- p2 text
FORM LAYOUT .
WA_LAYOUT-ZEBRA = 'X'.
ENDFORM. " LAYOUT
*& Form VARIANT
text
--> p1 text
<-- p2 text
FORM VARIANT .
CLEAR G_VARIANT.
G_VARIANT-REPORT = SY-REPID.
ENDFORM. " VARIANT
*& Form SAVE
text
--> p1 text
<-- p2 text
FORM SAVE .
CLEAR G_SAVE.
G_SAVE = 'A'.
ENDFORM. " SAVE
*& Form EVENTS
text
--> p1 text
<-- p2 text
FORM EVENTS .
CLEAR XS_EVENTS.
XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENTS-FORM = 'TOP_OF_PAGE'.
APPEND XS_EVENTS TO G_EVENTS.
ENDFORM. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
WRITE :/ ' INTELLI GROUP'.
ENDFORM. "TOP_OF_PAGE
*& Form ALV_DISPLAY
text
--> p1 text
<-- p2 text
FORM ALV_DISPLAY .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = PF_STATUS
I_CALLBACK_USER_COMMAND = USER_COMMAND
I_STRUCTURE_NAME =
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = G_SAVE
IS_VARIANT = G_VARIANT
IT_EVENTS = G_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
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_VBAP
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. " ALV_DISPLAY
*& Form SET_PF_STATUS
text
FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
ENDFORM. "SET_PF_STATUS
*& Form SET_USER_COMMAND
text
FORM SET_USER_COMMAND USING R_UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'DC'.
READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
SELECT SINGLE MTART
FROM MARA
INTO V_MTART
WHERE MATNR = IT_VBAP-MATNR.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
ELSE.
WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
WRITE :/ 'MATERIAL TYPE :' , V_MTART.
SUBMIT SLIS_DUMMY WITH P_MATNR EQ IT_VBAP-MATNR
WITH P_MTART EQ V_MTART.
ENDIF.
ENDIF.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'CLOSE'.
CALL TRANSACTION 'SE38'.
ENDCASE.
plz reward if useful -
Printing Line Items in Script without using driver program
How to print the line items of a internal table in sap script without using driver program? I am not supposed to edit anything in the driver program. Pls help me to solve this problem...
Hi,
You can try by creating a new driver program and a new FORM ENDFORM inside that for this purpose.
Regards,
Gaurav
Maybe you are looking for
-
Ipod touch keeps freezing in recovery mode
Every time I try to upgrade my ipod touch to 3.1.3, it crashes and goes into recovery mode and doesn't work. itunes doesn't recognize the device so I have to use someone else's PC and itunes account to restore it to its original settings. Anyone got
-
Contacts no longer in sync between iPhone and Mac after creating iCloud email address
A few days ago, I was asked (by iCloud) to create an iCloud email address because it would be "better" than the email address I've been using. Since then, most of my contacts have disappeared from my iPhone 4s. I have noticed that the newest contacts
-
IOS 8.3 Update - Push Mail Not Working
Hi guys, I updated to 8.3 last week and since then, I do not seem to be receiving any push mail. Fetch still works, but my iCloud based email which is the catchall for my various accounts (read: ALL OF MY MAIL), fails to push to my iPhone (6/128gb).
-
I was updating my iphone 4s on my computer and there was an error and my phone has the connect to itunes symbol but will not connect to itunes on my computer. I am unable to use my phone and im not sure what to do..
-
i had a side panel but when i updated a game it disappered and i want it back but dont remember how i got it the first time