How to convert this into alv display and also change parameterstoselect opt

tables :mara,marc,stpo.
parameters: p_werks like t001w-werks obligatory,
p_matnr like mara-matnr obligatory.
*select-options : p_matnr for mara-matnr obligatory.
*parameters: p_werks like marc-werks obligatory,
*p_matnr like marc-matnr obligatory.
constants c_x value 'X'.
data: begin of it_comp occurs 0,
idnrk like stpox-idnrk,
ojtxp like stpox-ojtxp,
menge like stpox-menge,
meins like stpox-meins,
matkl like stpox-matmk,
end of it_comp.
data: w_topmat like cstmat.
start-of-selection.
perform explode_assembly.
end-of-selection.
perform write_report.
top-of-page.
perform print_header.
form print_header.
write: /(18) 'Component'(h00),
(40) 'Description'(h01),
'Mat.Group'(h02),
(18) 'Quantity'(h03).
uline.
endform.
form write_report.
write: / w_topmat-matnr under text-h00 color col_heading,
w_topmat-maktx under text-h01 color col_heading.
loop at it_comp.
write: /
it_comp-idnrk under text-h00,
it_comp-ojtxp under text-h01,
it_comp-matkl under text-h02,
it_comp-menge unit it_comp-meins under text-h03,
it_comp-meins.
endloop.
uline.
endform.
form explode_assembly.
data: it_stb like stpox occurs 0 with header line,
it_stb2 like stpox occurs 0 with header line,
it_stb3 like stpox occurs 0 with header line,
w_msg(255) type c.
Explode highest level:
call function 'CS_BOM_EXPL_MAT_V2'
exporting
auskz = c_x
capid = 'PP01'
cuols = c_x
datuv = sy-datum
knfba = c_x
ksbvo = c_x
mbwls = c_x
mdmps = c_x
BGIXO = c_x
MKMAT = c_x
MMAPS = c_x
FBSTP = c_x
FTREL = c_x
mtnrv = p_matnr
werks = p_werks
importing
topmat = w_topmat
tables
stb = it_stb
exceptions
alt_not_found = 1
call_invalid = 2
material_not_found = 3
missing_authorization = 4
no_bom_found = 5
no_plant_data = 6
no_suitable_bom_found = 7
conversion_error = 8
others = 9.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
into w_msg.
write: / w_msg.
exit.
endif.
Don't process documents
delete it_stb where idnrk is initial.
Don't process valid from furure:
delete it_stb where datuv >= sy-datum.
Explode phantom assemblies up to last level
*do.
it_stb2[] = it_stb[].
*delete it_stb2 where dumps is initial.
*if it_stb2[] is initial.
*exit.
*endif.
*delete it_stb where not dumps is initial.
delete it_stb where VPRSV <> 'S' OR MMSTA = '61'.
loop at it_stb2.
call function 'CS_BOM_EXPL_MAT_V2'
exporting
capid = 'PP01'
auskz = c_x
cuols = c_x
datuv = sy-datum
knfba = c_x
ksbvo = c_x
mbwls = c_x
mdmps = c_x
FBSTP = c_x
FTREL = c_x
mtnrv = it_stb2-idnrk
werks = p_werks
tables
stb = it_stb3
exceptions
alt_not_found = 1
call_invalid = 2
material_not_found = 3
missing_authorization = 4
no_bom_found = 5
no_plant_data = 6
no_suitable_bom_found = 7
conversion_error = 8
others = 9.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
into w_msg.
write: / w_msg.
else.
delete it_stb3 where idnrk is initial.
delete it_Stb3 where sobsl = 50.
loop at it_stb3 .
multiply it_stb3-menge by it_stb2-menge.
modify it_stb3 transporting menge.
endloop.
append lines of it_stb3 to it_stb.
endif.
endloop.
*enddo.
Build table of components collecting the same components from
all levels
loop at it_stb.
it_comp-matkl = it_stb-matmk.
it_comp-idnrk = it_stb-idnrk.
it_comp-ojtxp = it_stb-ojtxp.
it_comp-menge = it_stb-menge.
it_comp-meins = it_stb-meins.
collect it_comp.
clear it_comp.
endloop.
ENDFORM.
using this i got the bom explosion and also i tried to use the following code
to diplay alv diplay,but i got the errormsg,
here  i got only one material input,instead of i want to use
select options to from to ,if i give 1 to 10 material
ouput is
material 1
descripn
bom and components
materials 2
desc
bom comp
TYPE-POOLS : SLIS.
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA : WA_FIELDCAT_LN LIKE LINE OF IT_FIELDCAT.
DATA : IT_EVENTCAT  TYPE SLIS_T_EVENT.
DATA : WA_EVENTCAT_LN  LIKE LINE OF IT_EVENTCAT.
DATA : IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA: S_COL_POS TYPE I.
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA : WA_FIELDCAT_LN LIKE LINE OF IT_FIELDCAT.
DATA : IT_EVENTCAT  TYPE SLIS_T_EVENT.
DATA : WA_EVENTCAT_LN  LIKE LINE OF IT_EVENTCAT.
DATA : IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA: S_COL_POS TYPE I.
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA : WA_FIELDCAT_LN LIKE LINE OF IT_FIELDCAT.
DATA : IT_EVENTCAT  TYPE SLIS_T_EVENT.
DATA : WA_EVENTCAT_LN  LIKE LINE OF IT_EVENTCAT.
DATA : IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA: S_COL_POS TYPE I.
FORM BUILD_FIELDCATALOG.
  PERFORM BUILD_FIELDCAT USING 'MATKL'.
  PERFORM BUILD_FIELDCAT USING 'IDNRK.
  PERFORM BUILD_FIELDCAT USING 'OJTXP.
PERFORM BUILD_FIELDCAT USING 'MENGE'.
PERFORM BUILD_FIELDCAT USING 'MEINS'.
ENDFORM.
FORM TO BUILD IN FIELD CATALOG FOR ALV FORM
FORM BUILD_FIELDCAT USING L_FIELDNAME LIKE DD03L-FIELDNAME S_TEXT LIKE DD03P-SCRTEXT_M.
  CLEAR WA_FIELDCAT_LN.
  ADD 1 TO S_COL_POS.
  WA_FIELDCAT_LN-REF_TABNAME  = 'IT_COMP'.
  WA_FIELDCAT_LN-FIELDNAME    = L_FIELDNAME.
  WA_FIELDCAT_LN-SELTEXT_M    = S_TEXT.
  WA_FIELDCAT_LN-COL_POS      = S_COL_POS.
  WA_FIELDCAT_LN-QFIELDNAME   = SPACE.
  WA_FIELDCAT_LN-HOTSPOT      = SPACE.
  WA_FIELDCAT_LN-JUST         = 'R'.
  APPEND WA_FIELDCAT_LN TO IT_FIELDCAT.
ENDFORM.
FORM TO BUILD IN FIELD CATALOG FOR ALV FORM
FORM DATA_DISPLAY.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
  I_CALLBACK_HTML_END_OF_LIST       = ' '
  I_STRUCTURE_NAME                  =
  I_BACKGROUND_ID                   = ' '
   I_GRID_TITLE                      = TEXT-001
  I_GRID_SETTINGS                   =
  IS_LAYOUT                         =
   IT_FIELDCAT                       = IT_FIELDCAT
IMPORTING
  E_EXIT_CAUSED_BY_CALLER           =
  ES_EXIT_CAUSED_BY_USER            =
  TABLES
    T_OUTTAB                          = IT_COMP
   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.
GIVE ME SOLUTION FOR THAT ON, VERY URGENT
THANKS IN ADVANCE
regards
ds

Hi
declare select-options instead of parameters
for converting a report to ALV
create a field catalog.
for this two option declare a itab with       
fcat    TYPE slis_t_fieldcat_alv
and pass the field name,descr etc to fcat and append the same.
or create structur same as your itab and pass the same with FM
'REUSE_ALV_FIELDCATALOG_MERGE'
use either <b>reuse_alv_grid_display or reuse_alv_list_display</b> .
and pass the itab.
thanks
Shiva

Similar Messages

  • How to convert  Timestamp  into exact Date and Time(FM)

    Hi Gurus,
    could anyone tel me  ,
    e.g:20.11.2008:11:23:54am
    How to convert Time stamp  into exact Date and Time

    Hi,
    Following is one way of doing it
    Timestamp timeStamp = new Timestamp(Calendar.getInstance().getTimeInMillis());
              System.out.println(timeStamp);
              SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy");
              System.out.println(dateFormat.format(timeStamp));
              SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
              System.out.println(timeFormat.format(timeStamp));
    Output
    2008-11-20 11:59:35.693 -> Timestamp
    11/20/2008
    11:59:35
    Regards
    Ayyapparaj

  • How to insert data into datagrid dynamically and also programatically with data and column names being retrived from a xml file..

    iam not able to insert data into datagrid corresponding to the column names..as iam inserting both data and column names programatically..ie iam not able to co relate the data with the column names.plzzz help me asap

    A DataGrid is row-based rather than cell-based with each row
    corresponding to an item in an underlying collection (specified in the
    dataProvider property). In order to add data to a DataGrid you
    manipulate the underlying collection, rather than the grid directly.
    Based on the limited description of your problem I would imagine you
    would need to create dynamic objects with property names that correspond
    to the dataFields of your dynamically created datagrid columns.
    So if you had created columns with dataFields "alpha", "beta" and
    "gamma" on your datagrid, you could create an item in your grid by
    adding the following object to your dataProvider:
    var gridItem : Object = new Object();
    gridItem.alpha = "alphaValue";
    gridItem.beta = "betaValue";
    gridItem.gamma = "gammaValue";

  • How to Convert frames into minutes and seconds

    Hi,
    does anyone know how to convert frames into time (minutes and
    seconds). I need the users to view the swf with current time being
    played and over time. I have 2152 frames in total and I want that
    to be converted to time. Can anyone help me on this. I would really
    appreciate it. It is very urgent!!!!
    Thanks

    Time Indicator,
    > does anyone know how to convert frames into time
    (minutes
    > and seconds).
    That depends entirely on the framerate of the movie. At the
    default
    12fps, 12 frames would be one second; 24 frames would be two.
    At 24fps, 24
    frames would be one second.
    > I need the users to view the swf with current time being
    played
    > and over time. I have 2152 frames in total and I want
    that to be
    > converted to time. Can anyone help me on this. I would
    really
    > appreciate it. It is very urgent!!!!
    Judging by your four exclamation points, I'd say it's
    definitely urgent!
    Well, again, if you're at 12fps, 2152 frames would take 179
    seconds, or 2
    minutes and 59 seconds. I arrived at that number by dividing
    2152 by 12.
    Keep in mind, though, framerate is actually more of a
    guideline than an
    exact figure. Framerate determines the rate at which Flash
    will *try* to
    display content. On an especially slow computer, the Flash
    Player may not
    be able to keep up, and the same number of frames might
    actually take more
    time.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • I have 13 dollars left on an apple store gift card, how can I convert this into money for my iTunes account?

    I have 13 dollars left on an apple store gift card, how can I convert this into money for my iTunes account?

    You can't.

  • I am wondering what upgrades I need in order to convert PDFs into another format and compress the size of a PDF (if this is possible)?

    I want to be able to convert PDFs into another format and I know this can be achieved with a small upgrade. However I am also looking for the ability to compress the size of PDFs, if this is at all possible.

    You can use Acrobat Standard for this.

  • I am based in Russia, and I use a Russian cred card number. Hence my apple store page is in Russian language (which i dont speak). Can I change this into English language and if yes, how?

    I am based in Russia, and I use a Russian cred card number. Hence my apple store page is in Russian language (which i dont speak). Can I change this into English language and if yes, how?

    The only way I know is that you need a physical address and credit card of an English speaking country.

  • How to convert .class into .jar file

    Hi,
    How to convert .class into .jar file

    jsf_VWP5.5.1 wrote:
    Hi,
    How to convert .class into .jar fileFrom a command prompt, cd to the location of your .class file(s).
    If you want to create a simple jar, use: jar -cf Whatever.jar Whatever.class
    If you want to compile all .class files in a directory into a jar, use *.class instead.
    Now, I'm going to assume you want to create an executable jar... here's how to do that:
    1) Create a blank text file; for this example, lets call it main.txt.
    2) In the first line of main.txt, type: Main-class: Whatever ('Whatever' should be the name of the class in your program where the main() method is located)
    3) Press enter to go to the next line (someone please correct me if I'm wrong, but if you don't insert the line break/CR after the Main-class: statement, this will not work... in my experience, this is true)
    4) Make sure you save this file in the same directory as your .class file(s).
    5) Type: jar -cmf Whatever.jar main.txt Whatever.class
    ...and that's about it. For more information on the usage of the jar command and to understand the switches (such as -cmf), try jar --help.
    Hope that helps.

  • Can any one tell me how to break this into separate columns 05/13/2014,"46","48","37","70","74","1","2","121000000.0000"

    Can any one tell me how to break this into separate columns 05/13/2014,"46","48","37","70","74","1","2","121000000.0000"

    Paste your content into TextEdit. Format > Make Plain Text.
    Comand-S to save.
    Command-Click the filename at the top of the TextEdit window. Click on the second line, the name of the folder where you saved the document.
    Select the extension of the document Name in the finder window that is being displayed and replace TXT with CSV.
    Right-Click the csv file and choose Open With > Numbers.
    Numbers will open with a column for each field in your data.
    Jerry

  • Can anyone explain how to create this effect in Deamweaver and Fireworks?

    This site was oriinally done in dreamweaver - but the shadow
    effect was done
    outside of Dreamweaver. When I save to html and load into
    Dreamweaver it
    makes no sense to me.
    Can anyone explain how to create this effect in Deamweaver
    and Fireworks?
    http://www.fundflowsystems.com/test.php
    Thanks in advance,
    Joe

    Thank you so much...
    You is da bomb!
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:[email protected]...
    > Yes - a blank (completely blank) page.
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    > ==================
    >
    >
    > "Ken Binney" <[email protected]>
    wrote in message
    > news:[email protected]...
    >> Murray, one more favor if you would be so kind...
    >> Do you recall how this page degraded in Safari?
    >>
    >>
    http://www.binney.us/table-allcode.htm
    >>
    >>
    >> "Murray *ACE*"
    <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Nope. Sorry. You need a Mac.
    >>>
    >>> --
    >>> Murray --- ICQ 71997575
    >>> Adobe Community Expert
    >>> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >>> ==================
    >>>
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>>
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    >>> ==================
    >>>
    >>>
    >>> "Ken Binney"
    <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> Thanks Murray...
    >>>>
    >>>> Is there a way I can test for Safari on my
    PC XP ?
    >>>>
    >>>> "Murray *ACE*"
    <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>>> Fails in Safari, Ken.
    >>>>>
    >>>>> --
    >>>>> Murray --- ICQ 71997575
    >>>>> Adobe Community Expert
    >>>>> (If you *MUST* email me, don't LAUGH
    when you do so!)
    >>>>> ==================
    >>>>>
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >>>>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>>>>
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    >>>>> ==================
    >>>>>
    >>>>>
    >>>>> "Ken Binney"
    <[email protected]> wrote in message
    >>>>>
    news:[email protected]...
    >>>>>> Here is a solution requiring NO
    images.
    >>>>>> The CSS and the Javascript can
    easily made remote the page
    >>>>>>
    >>>>>> <!DOCTYPE HTML PUBLIC
    "-//W3C//DTD HTML 4.01 Transitional//EN"
    >>>>>> "
    http://www.w3.org/TR/html4/loose.dtd">
    >>>>>> <html>
    >>>>>> <head>
    >>>>>> <title>Shadow</title>
    >>>>>> <meta http-equiv="Content-Type"
    content="text/html;
    >>>>>> charset=iso-8859-1">
    >>>>>> <script
    type="text/javascript">
    >>>>>> var depth = 6 // in pixels
    >>>>>>
    >>>>>> // addLoadEvent t
    >>>>>> function addLoadEvent(func) {
    >>>>>> var oldonload = window.onload;
    >>>>>> if (typeof window.onload !=
    'function') {
    >>>>>> window.onload = func;
    >>>>>> } else {
    >>>>>> window.onload = function() {
    >>>>>> if (oldonload) {
    >>>>>> oldonload();
    >>>>>> }
    >>>>>> func();
    >>>>>> }
    >>>>>> }
    >>>>>> }
    >>>>>>
    >>>>>> addLoadEvent(function() {
    >>>>>>
    >>>>>> var a = document.all ? document.all
    >>>>>> document.getElementsByTagName('*');
    >>>>>> for (var i = 0;i < a.length;i++)
    >>>>>> if (a
    .className == "shadow") {
    >>>>>> for (x = 0;x < depth;x++) {
    >>>>>> var newSd =
    document.createElement("DIV")
    >>>>>> newSd.className = "shadow2"
    >>>>>> newSd.style.background = a.id
    >>>>>> newSd.style.width = a
    .offsetWidth + "px"
    >>>>>> newSd.style.height =
    a.offsetHeight + "px"
    >>>>>> newSd.style.left = a
    .offsetLeft + x + "px"
    >>>>>> newSd.style.top = a.offsetTop +
    x + "px"
    >>>>>> document.body.appendChild(newSd)
    >>>>>> }
    >>>>>> }
    >>>>>> }
    >>>>>> }
    >>>>>> );
    >>>>>>
    >>>>>> </script>
    >>>>>> <style>
    >>>>>> .shadow {
    >>>>>> border: 1px solid silver;
    >>>>>> padding: 2px;
    >>>>>> font: 10pt arial;
    >>>>>> position: relative;
    >>>>>> display: inline;
    >>>>>> background: white;
    >>>>>> z-index: 100
    >>>>>> }
    >>>>>> .shadow2 {
    >>>>>> overflow: hidden;
    >>>>>> position: absolute;
    >>>>>> filter: alpha(Opacity=15); /* modify
    to change the shade
    >>>>>> solidity/opacity, same as below */
    >>>>>> opacity: 0.1; /* firefox 1.5 opacity
    >>>>>> -moz-opacity: 0.2; /* mozilla
    opacity */
    >>>>>> -khtml-opacity: 0.1; /* opacity */
    >>>>>> z-index: 10
    >>>>>> }
    >>>>>> </style>
    >>>>>>
    >>>>>> </head>
    >>>>>>
    >>>>>> <body>
    >>>>>> <table width="800" border="0"
    align="center" cellpadding="0"
    >>>>>> cellspacing="0" class="shadow"
    id="#000000">
    >>>>>> <tr>
    >>>>>> <td> </td>
    >>>>>> <td> </td>
    >>>>>> <td> </td>
    >>>>>> </tr>
    >>>>>> <tr>
    >>>>>> <td> </td>
    >>>>>> <td> </td>
    >>>>>> <td> </td>
    >>>>>> </tr>
    >>>>>> <tr>
    >>>>>> <td> </td>
    >>>>>> <td> </td>
    >>>>>> <td> </td>
    >>>>>> </tr>
    >>>>>> <tr>
    >>>>>> <td> </td>
    >>>>>> <td> </td>
    >>>>>> <td> </td>
    >>>>>> </tr>
    >>>>>> <tr>
    >>>>>> <td> </td>
    >>>>>> <td> </td>
    >>>>>> <td> </td>
    >>>>>> </tr>
    >>>>>> </table>
    >>>>>> </body>
    >>>>>> </html>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> "Joe"
    <[email protected]> wrote in message
    >>>>>>
    news:[email protected]...
    >>>>>>>
    >>>>>>> This site was oriinally done in
    dreamweaver - but the shadow effect
    >>>>>>> was done outside of Dreamweaver.
    When I save to html and load into
    >>>>>>> Dreamweaver it makes no sense to
    me.
    >>>>>>>
    >>>>>>> Can anyone explain how to create
    this effect in Deamweaver and
    >>>>>>> Fireworks?
    >>>>>>>
    >>>>>>>
    http://www.fundflowsystems.com/test.php
    >>>>>>>
    >>>>>>> Thanks in advance,
    >>>>>>>
    >>>>>>> Joe
    >>>>>>>
    >>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>
    >>
    >>
    >
    >

  • How to convert smartforms into Adobe forms.

    Hi......
    How to convert smartforms into Adobe forms.
    Regards
    Anbu B

    Hi,
    You need to use the Function Module CONVERT_OTF.
    Please check the below code
    REPORT zsuresh_test.
    Variable declarations
    DATA:
    w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
    w_fmodule TYPE rs38l_fnam,
    w_cparam TYPE ssfctrlop,
    w_outoptions TYPE ssfcompop,
    W_bin_filesize TYPE i, " Binary File Size
    w_FILE_NAME type string,
    w_File_path type string,
    w_FULL_PATH type string.
    Internal tables declaration
    Internal table to hold the OTF data
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data recd from the SMARTFORM
    t_otf_from_fm TYPE ssfcrescl,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    This function module call is used to retrieve the name of the Function
    module generated when the SMARTFORM is activated
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = w_form_name
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = w_fmodule
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Calling the SMARTFORM using the function module retrieved above
    GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
    format of the output
    w_cparam-no_dialog = 'X'.
    w_cparam-preview = space. " Suppressing the dialog box
                                                        " for print preview
    w_cparam-getotf = 'X'.
    Printer name to be used is provided in the export parameter
    OUTPUT_OPTIONS
    w_outoptions-tddest = 'LP01'.
    CALL FUNCTION w_fmodule
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = w_cparam
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = w_outoptions
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    job_output_info = t_otf_from_fm
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    t_otf[] = t_otf_from_fm-otfdata[].
    Function Module CONVERT_OTF is used to convert the OTF format to PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    TABLES
    otf = T_OTF
    lines = T_pdf_tab
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
    WINDOW_TITLE =
    DEFAULT_EXTENSION =
    DEFAULT_FILE_NAME =
    FILE_FILTER =
    INITIAL_DIRECTORY =
    WITH_ENCODING =
    PROMPT_ON_OVERWRITE = 'X'
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    USER_ACTION =
    FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    FILETYPE = 'BIN'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = T_pdf_tab
    FIELDNAMES =
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks,
    Ruthra

  • How to convert bytes[] into File object

    hi
    how to convert byte array into File object
    pls.. help me
    Regards
    srinu

    rrrr007 wrote:
    Hi,
    How to convert bytes[] into multipage File object?? ]There's no such thing as a "multipage File object." You ought to re-read this thread closely, and read the [API docs for File|http://java.sun.com/javase/6/docs/api/java/io/File.html] to clear up your confusion about what a File object is.
    I used the java.io.SequenceInputStream to concatenate two input streams (basically .pdf files) into a single input stream. I need to create a single multipage pdf file using this input stream. Then you need a pdf API, like iText or fop. You can't just concatenate pdf files, word docs, excel sheets, etc., like you can text files. Google for java pdf api.

  • How to convert mysql into bekerley db?

    i have a mysql database ,there is a table in it ,only have 7 fields:symbol,date,open,high,low,close,vol.
    would you mind to tell me how to convert it into bekerley db?

    Hello,
    You can build a drop-in replacement for SQLite by specifying the
    --enable-sql_compat flag to Berkeley DB's configure script.  This
    creates a binary, sqlite3 which has the same interface as SQLite.
    The "Getting Started with the Oracle Berkeley DB SQL API" and FAQ
    have the details:
    http://www.oracle.com/technology/products/berkeley-db/faq/db_faq.html
    http://www.oracle.com/technology/documentation/berkeley-db/db/bdb-sql/index.html
    Thanks,
    Sandra

  • How to convert rows into column

    Hi,
    can any one help me how to convert rows into column by pl/sql procedure.
    Thanks and Regards

    http://www.oracle.com/technology/oramag/code/tips2004/050304.html
    -- dropping the sample table if exists
    drop table rowstocol
    -- create sample table
    create table rowstocol ( name varchar2(20));
    -- Inserting rows into sample table
    insert into rowstocol values('Amit Zhankar');
    insert into rowstocol values('Piyu Yawalkar');
    insert into rowstocol values('Piyu Yawalkar');
    insert into rowstocol values('Ashish Ghelani');
    insert into rowstocol values('Aditi Zhankar');
    insert into rowstocol values('Tom Kyte');
    insert into rowstocol values('Oracle');
    -- Following query should be run to create a sql. This result sql should be run to convert rows to column.
    -- The following query uses just the tablename (whose data is to be converted) and name of the column (which is to be converted).
    -- Example taken here is table rowstocol, column name.
    SELECT cc
    FROM (select decode(rn ,1 ,'Select ',null) ||' MAX (CASE WHEN dr = '|| rownum||' THEN DECODE (rn,1, col1) END) '||
    decode(rn,maxr,' col1 from ','||'||chr(39)||','||chr(39)||'|| ') cc,rn,maxr
    from (SELECT ROWNUM rn,count(0) over() maxr FROM rowstocol) order by rn) trows
    union all
    select '(SELECT tabs.col1, DENSE_RANK () OVER (ORDER BY col1,rowid) dr,dense_rank() OVER (order by 1) rn
    FROM (SELECT NAME col1 FROM rowstocol) tabs ) group by rn' cc from dual;
    -- The result of this query will do the reqd conversion from row to column.
    -- Replace table rowstocol by your table, column name by your column.
    CC
    Select MAX (CASE WHEN dr = 1 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 2 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 3 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 4 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 5 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 6 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 7 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 8 THEN DECODE (rn,1, col1) END) col1 from
    (SELECT tabs.col1, DENSE_RANK () OVER (ORDER BY col1,rowid) dr,dense_rank() OVER (order by 1) rn
    FROM (SELECT NAME col1 FROM rowstocol) tabs ) group by rn
    Select MAX (CASE WHEN dr = 1 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 2 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 3 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 4 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 5 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 6 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 7 THEN DECODE (rn,1, col1) END) ||','||
    MAX (CASE WHEN dr = 8 THEN DECODE (rn,1, col1) END) col1 from
    (SELECT tabs.col1, DENSE_RANK () OVER (ORDER BY col1,rowid) dr,dense_rank() OVER (order by 1) rn
    FROM (SELECT NAME col1 FROM rowstocol) tabs ) group by rn;
    COL1
    Aditi Zhankar,Amit Zhankar,Ashish Ghelani,Oracle,Oracle,Piyu Yawalkar,Piyu Yawalkar,Tom Kyte
    Edited by: bhooma on Jan 20, 2009 2:44 AM

  • How to convert byte into string

    can any tell me how to convert byte into string
    when im an debugging thid code in eclipse it shows the result in integer format instead of string but in command prompt it is showing result in string format..........plz help
    package str;
    import java.io.*;
    public class Testfile {
    public static void main(String rags[])
    byte b[]=new byte[100];
    try{
    FileInputStream file=new FileInputStream("abc.txt");
    file.read(b,0,50);
    catch(Exception e)
         System.out.println("Exception is:"+e);
    System.out.println(b);
    String str=new String(b);
    System.out.println(str);
    }

    Namrata.Kakkar wrote:
    errors: count cannot be resolved and Unhandled exception type Unsupported Encoding Exception.
    If i write an integer value instead of "count" then Unhandled exception type Unsupported Encoding Exception error is left.This is elementary. You need to go back to [http://java.sun.com/docs/books/tutorial/|http://java.sun.com/docs/books/tutorial/] .

Maybe you are looking for

  • Mac Mini - DVD Drive malfunction?

    Hello, For the last 2 weeks, my MacMini's DVD drive doesn't work normally : - trying to burn an audio CD doesn't work if I don't reduce the burning speed thru iTunes parameters - a CD bought on the Apple store with a full licence software when insert

  • Start MacBook retina with external drive

    how can I start a MacBook retina with an external drive? I'm trying to trying to use a clone of my system with Mavericks to run the Mac so that I do a clean install of  Yosemite. Holding Option key while starting doesn't give me the external drive to

  • How to Assign an event to a button in PCUI

    Hi everybody, How to Assign an event to a button in PCUI ? Thanks & Regards Hassan

  • Load balancing in Adapters

    How to use Load balancing in Adapters. Can I know what is the purpose of load balancing.

  • PDF Proposal, Ala Carte Items, with a Grand Total Automatically Generated

    I need to create a proposal containing check boxes so a client can choose projects ala carte and see a grand total for his selections at the bottom.  I am using acrobat x pro.  I am a novice, and don't even know where to write a javascript, or how to