PHP dynamic content for form list field on tabbed panel
I have been trying to use PHP dynamic content to populate a
form list field. Works fine on a regular page, but doesn't seem to
work (or works very erratically) if the form is on a tab of a Spry
tabbed panel. Erratically means (as I've observed) the values will
appear if the list field is the second on a tab but not the first.
Haven't tried three on a tab... Anyone know if this is supposed to
work?
Thank You !!! to both of you above.
Shant,
The scheme youv'e proposed makes sense and I had thought of the same before posting the question. I already did a little POC on it but then realised this works if I can use complete list of values of 1st Field to decide the value of 2nd and so forth. But I rather need to know which one among those was clicked. Moreover, my right side list is usually not null when page loads for the first time (bcoz Field name is a path exp).
Also, the real problem here is that, when I click on different values on the right side of multi-select(already selected values) of 1st Field, allowedValues and Derivation of 2nd should change. That GUI event is not capturable from whatever I've been able to read (onClick is not applicable for MultiSelect, and onChange doesn't serve my purpose, coz I need to know what value was clicked on).
The solution I thought and implemented was to take the right side of multi-select, into an extra (read redundant), single-select Field. And then have the 2nd multi-select depend on it via Derivation and allowedValues.
Having two redundant single-selects, isn't the most elegant solution but I can't think of anything better. Any thoughts ???
If I'm not really overlooking something MultiSelect class should have an extra Property exposed....
- AndyDev
Edited by: AndyDev on Nov 6, 2007 2:04 PM
Similar Messages
-
Getting error while trying to set text for form value field in oaf
Hi ALL,
When i am trying to set text for a form value type field it is giving null pointer exception, please help me out.
I tried below way.
OAFormValueBean containlineid=(OAFormValueBean)webBean.findChildRecursive("item11");
containlineid.setText(pageContext,"test");
ThanksHI Keerthi,
I am able to set and get the value now, i am able to see the data in my log window, but in my page it is erroring out, giving null pointer exception.
after commenting the two lines setting and getting value page is running fine, so any clue on this, please check the below code.
public class XXDPECONTAINLINESCO extends OAControllerImpl
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAApplicationModule am = (OAApplicationModule) pageContext.getApplicationModule(webBean);
OARawTextBean startDIVTagRawBean =
(OARawTextBean) webBean.findChildRecursive("DivStart");
System.out.println("debhorizontal"+ startDIVTagRawBean);
// addScrollBarsToTable(pageContext, webBean,"DivStart", "DivEnd", true , "400",true,"400");
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
String preplenish = pageContext.getParameter("item1");
String pworkorder = pageContext.getParameter("item2");
String pdmr = pageContext.getParameter("item4");
String punloading = pageContext.getParameter("item6");
String prrnum=pageContext.getParameter("item16");
String pworknum=pageContext.getParameter("item14");
String pdtr=pageContext.getParameter("item13");
Serializable param[] = {preplenish,pworkorder,pdmr,punloading,prrnum,pworknum,pdtr};
OAApplicationModule am = (OAApplicationModule) pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("item11")!=null)
if(am !=null)
am.invokeMethod("getSearchData",param);
if (pageContext.getParameter("item30") != null) {
String recout = (String)am.invokeMethod("getSelectedData");
System.out.println("deb multi select test"+recout);
System.out.println("1111test1"+pageContext.getParameter("item32"));
OAFormValueBean containlineid=(OAFormValueBean)webBean.findChildRecursive("item32");
System.out.println("1111test2"+pageContext.getParameter("item32"));
//containlineid.setValue(pageContext,recout);
System.out.println("1111"+pageContext.getParameter("item32"));
/// System.out.println("22222"+containlineid.getValue(pageContext));
containlineid.setValue(pageContext,recout);
containlineid.getValue(pageContext);
System.out.println("1111test3"+pageContext.getParameter("item32"));
--------------Error it is giving in the page as----------------
Exception Details.
oracle.apps.fnd.framework.OAException: java.lang.NullPointerException at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source) at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(Unknown Source) at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(Unknown Source) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source) at _OA._jspService(_OA.java:71) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) ## Detail 0 ## java.lang.NullPointerException at xxdpe.oracle.apps.ak.xxdpecontain.webui.XXDPECONTAINLINESCO.processFormRequest(XXDPECONTAINLINESCO.java:123) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source) at oracle.apps.fnd.framework.webui.beans.layout.OAMessageComponentLayoutBean.processFormRequest(Unknown Source
Thnaks -
InDesign CS6 how to set justification for form text field?
Hi everyone,
I've been playing with the ability to create form for PDF file but I haven't figure out how to set a center justification for a text field. By default it's left. Same thing for font, the one selected in InDesign while creating the form isn't used when editing the form in Acrobat.
Do I need to create a paragraph style with a specific name to preserve both attributes?
Thanks.InDesign CS6's forms features are great, but you're looking as version 1.0 of the feature. Those features cannot be set in InDesign.
Furthermore, if you try to pick a font other than the standard ones at the top of the menu, don't expect that your form users will be able to pick those fonts when they open up the form in Reader or Acrobat. I'm pretty sure that custom fonts are not stored in the PDF form. -
hi to all,
i've a question regarding lov query based select list:
For a certain user i need that the lov display a list
if app_user = BACK_OFFICE I NEED THAT ther query on wich is populated the
select list is qry 1.
if app_user is another (consultant) i need query 2 for populating the select list
1) select name|| ' ' || fname D, id K from partner
2) select name|| ' ' || fname D, id K from partner WHERE UNAME=(:APP_USER)
Any solutions would be greatly appreciated.
Another solution would be to have 2 different apps (one for back-office, one for external consultant), but there i should always duplicate all changes to the second one, loosing a lot of time.
Now thinking as well to use hidden fields.
If not clear enough please ask me.
Thanx a lot.
Message was edited by:
Marcello NocitoI think one solution wold be to create two different named querys, one containing query 1 and the second query 2. Than u must create an Application Item(like a session variable) in wich u will store you condition. If you want to use the app_user variable u allready have it so you don't need to create it any more. On your page where u want to display the different select list u create two items, one with the query 1 as source and a second item(select list) having the source query 2. Then you must add a condition display on both of them like. Item one is displayed when Value of Item in expression 1 equals expression 2. And you pust :APP_USER in expression 1 and BACK_OFFICE in expression 2. And for the other item, that contains query 2, you put the opposite condition Value of item in expression 1 is not equal to expression 2, and expression 1 is :APP_USER and in expression 2 is BACK_OFFICE.
Hope this helps.
Florin -
POLL: PHP or JS for form validation.
I'm just getting started with my first from the ground up app
and still not sure which will serve me best. At this stage I'd rate
my skill level in each language about the same, intermediate. Since
both handle regex I can't decide if server-side or client-side is
the way to go. Or is there a place and need for each? I'm
interested in things like portability, compatibility, security,
speed and anything else you think is an important factor.
Would like to hear from people that have made this decision
and what benifits you feel you get from your choice.
Thanks in advance,
Mike D.On 19 Jun 2007 in macromedia.dreamweaver.appdev, mdonahue
wrote:
> I'm just getting started with my first from the ground
up app and
> still not sure which will serve me best. At this stage
I'd rate my
> skill level in each language about the same,
intermediate. Since
> both handle regex I can't decide if server-side or
client-side is
> the way to go. Or is there a place and need for each?
I'm interested
> in things like portability, compatibility, security,
speed and
> anything else you think is an important factor.
>
> Would like to hear from people that have made this
decision and what
> benifits you feel you get from your choice.
Poll?
You absolutely, positively have to do validation serverside.
Javascript
validation can be avoided by the simple expedient of shutting
off
javascript. (For example, spambots which abuse forms don't
run
javascript.) Your only choice is to use some kind of
serverside
validation. If you want to do clientside validation with
javascript,
that's an added feature, but it's not necessary.
Joe Makowiec
http://makowiec.net/
Email:
http://makowiec.net/contact.php -
Dynamic FormUID For Forms Created with XML
I'm able to load a form via XML using VB6 and the SDK (screen painter generated). The problem is that I get an error if the form already exists and is loaded again due to the fact that I'm not able to assign a dynamic and unique FormUID on initial form creation like you can when creating a form via the SCG. Is there a way to assign a unique FormUID on the fly using the SDK and an XML form?
Hi Greg,
After I read the XML from a file, I manually change the FormUID to a unique one via XML before I the XML into SBO. I have not found anything inside the SDK which does this, so unfortunately you have to do it yourself.
Regards, Lita -
Need to delete Table Contents for the list of tables in the internal table.
Hi All,
I have req where in I have the list of table in an internal table and delete the contents of the tables which are in the internal table.
I need to delete the contents of the table using Native SQL statements. Else I can use function modules to delte the contents of table.
Thanks in advance. Appriciable if you can revert as soon as possible at all.
Thanks and Regards,
Raj.
Edited by: Thomas Zloch on Mar 11, 2010 1:56 PMHi,
You can try using truncate statement in native sql.
EXEC SQL.
TRUNCATE TABLE ABC.
ENDEXEC. -
Hi there,
I have 2 tables:
select * from table1:
FIELD1
V1
V2
V3
select * from table2:
FIELD2
V1,V2,V3
I want the following query has same return as select * from table1:
select * from table1 where field1 in (select field2 from table2)
But, I got 0 row return.
Can you help me?
Thanks,SQL> create table table1 (field1 varchar2(5)) tablespace users;
Table created.
SQL> create table table2 (field2 varchar2(5)) tablespace users;
Table created.
SQL> insert into table1 values('V1');
1 row created.
SQL> insert into table1 values('V2');
1 row created.
SQL> insert into table1 values('V3');
1 row created.
SQL> commit;
Commit complete.
SQL> insert into table2 values('V1');
1 row created.
SQL> insert into table2 values('V2');
1 row created.
SQL> insert into table2 values('V3');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from table1;
FIELD
V1
V2
V3
SQL> select * from table2;
FIELD
V1
V2
V3
SQL> desc table1
Name Null? Type
1 FIELD1 VARCHAR2(5)
SQL> desc table2
Name Null? Type
1 FIELD2 VARCHAR2(5)
SQL> select * from table1 where field1 in (select field2 from table2);
FIELD
V1
V2
V3
SQL> -
Default value for choice list in af:query panel
Hi all,
I have af:queryPanel in which i made one choicelist with static list.i want to have the first value of the static list as a default value to the field in af:queryPanel.how can i achieve this.
I am using jdev11.1.1.5
Thanks in advanceHi,
In your model project, create a view criteria (on the VO which you would be using for displaying values in the LOV). In your view criteria add the attributes and set default value (say add Empno and set its value to literal 1111). Now, when creating LOV for the next view object, select the view criteria you've created in previous step (instead of using all queryable attributes).
Refer : http://docs.oracle.com/cd/E23943_01/web.1111/b31974/lists.htm#BEIBAFDD
-Arun -
Table expands outside of the content area in a tabbed panel - sometimes
I am using a tabbed panel to create several different views of a database. The system is working pretty well, the only problem I have is that the content for almost all of the tabbed panels extend beyond the right hand end of the content panel. The page is here www.mwlcraftshow.com/gordo.php and you'll see that when you select the "Declined" tab the data shows correctly within the content area, but if you select "Accepted" or "All vendors" the table extends beyond the content panel. I've reviewed the html and css and don't see any difference between the tab that works (Declined) and tabs that don't work (All vendors, Accepted).
I'd really appreciate someone pointing me in the right direction.
ThanksI see that you are indicating td widths for your tables. If you don't try to dictate widths in tables AND reduce the size of your text, you will have better luck keeping the table on the panel. You might also consider making the live area for the TabbedPanels wider, as well (the whole widget). If you have a limited size monitor, you won't be able to do that.
The only size you should use on this table is for the table width itself: use 100%, and it will fill the TabbedPanel Content width-wise, and should force the columns to fit (if you take off their widths as I suggested above).
With tables, absolute width indicators seem only to be a "suggestion" as tables will automatically expand if the content is too much for the content cells. Applying a 100% width for the table as a whole should force the cells to expand down and not horizontally.
Beth -
Create Dynamic variant for date field
Hello all,
I need to have the current month year displayed in my selection screen in format MM.YYYY and the field is of type SPMON (Period to analyze - month).
and while saving the variant it is showing only 'T' (entries from TVARVC table) in "selection variable" field and not showing 'D' (Dynamic selection) for the above field.
So,please help me in resolving this issue.
Thanks in advance.hi
good
go through this code,i hope this ll help you to create the dynamic variant.
Please find the sample using RS_CREATE_VARIANT (FM).
It make use of other FM also , just have a look .
Hope this may help you.
REPORT ZEXAMPLE.
DATA: JVARI_DESC LIKE VARID,
RC LIKE SY-SUBRC,
VARIANT_TEXT LIKE VARIT-VTEXT,
JVT LIKE VARIT OCCURS 0 WITH HEADER LINE,
SELPA LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
PARMS LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
OBJS LIKE VANZ OCCURS 0 WITH HEADER LINE.
PARAMETERS: P_VAR LIKE RSVAR-VARIANT. "NAME OF VARIANT
JVARI_DESC-REPORT = SY-REPID.
JVARI_DESC-VARIANT = P_VAR.
JVARI_DESC-ENAME = 'EXAMPLES'.
JVT-REPORT = SY-REPID.
JVT-VARIANT = P_VAR.
JVT-LANGU = SY-LANGU.
JVT-VTEXT = 'FUNCTION EXAMPLES'.
APPEND JVT.
CLEAR SELPA.
SELPA-SIGN = 'I'.
SELPA-OPTION = 'EQ'.
SELPA-KIND = 'P'.
SELPA-SELNAME = 'P_VAR'.
SELPA-LOW = P_VAR.
APPEND SELPA.
CHECK IF VARIANT EXISTS
CALL FUNCTION 'RS_VARIANT_EXISTS'
EXPORTING
REPORT = JVARI_DESC-REPORT
VARIANT = P_VAR
IMPORTING
R_C = RC
EXCEPTIONS
NOT_AUTHORIZED = 1
NO_REPORT = 2
REPORT_NOT_EXISTENT = 3
REPORT_NOT_SUPPLIED = 4
OTHERS = 5.
IF RC = 0 AND SY-SUBRC EQ 0.
DELETE OLD VARIANT
CALL FUNCTION 'RS_VARIANT_DELETE'
EXPORTING
REPORT = JVARI_DESC-REPORT
VARIANT = P_VAR
FLAG_CONFIRMSCREEN = 'X'
EXCEPTIONS
NOT_AUTHORIZED = 1
NOT_EXECUTED = 2
NO_REPORT = 3
REPORT_NOT_EXISTENT = 4
REPORT_NOT_SUPPLIED = 5
VARIANT_LOCKED = 6
VARIANT_NOT_EXISTENT = 7
NO_CORR_INSERT = 8
VARIANT_PROTECTED = 9
OTHERS = 10.
IF SY-SUBRC NE 0.
WRITE: 'UNABLE TO DELETE VARIANT:', P_VAR ,'STATUS=', SY-SUBRC.
EXIT.
ELSE.
WRITE:/ P_VAR, 'DELETED'.
ENDIF.
ELSE.
WRITE:/ P_VAR, 'DOES NOT EXIST'.
ENDIF. " ALREADY EXISTS
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
CURR_REPORT = JVARI_DESC-REPORT
CURR_VARIANT = P_VAR
VARI_DESC = JVARI_DESC
TABLES
VARI_CONTENTS = SELPA
VARI_TEXT = JVT
EXCEPTIONS
ILLEGAL_REPORT_OR_VARIANT = 1
ILLEGAL_VARIANTNAME = 2
NOT_AUTHORIZED = 3
NOT_EXECUTED = 4
REPORT_NOT_EXISTENT = 5
REPORT_NOT_SUPPLIED = 6
VARIANT_EXISTS = 7
VARIANT_LOCKED = 8
OTHERS = 9.
IF SY-SUBRC EQ 0.
WRITE:/ 'VARIANT', P_VAR, 'CREATED FOR PROGRAM', JVARI_DESC-REPORT.
ELSE.
WRITE:/ 'VARIANT', P_VAR, 'NOT CREATED FOR PROGRAM', JVARI_DESC-REPORT.
EXIT.
ENDIF.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
REPORT = JVARI_DESC-REPORT
VARIANT = P_VAR
TABLES
VALUTAB = PARMS
OBJECTS = OBJS
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 2
OTHERS = 3.
IF SY-SUBRC NE 0.
WRITE : / 'ERROR READING VARIANT CONTENTS.'.
ELSE.
CALL FUNCTION 'RS_VARIANT_TEXT'
EXPORTING
LANGU = SY-LANGU
CURR_REPORT = JVARI_DESC-REPORT
VARIANT = P_VAR
IMPORTING
V_TEXT = VARIANT_TEXT.
WRITE:/ 'VARIANT DESCRIPTION:', VARIANT_TEXT.
LOOP AT PARMS.
CHECK PARMS-LOW NE SPACE OR PARMS-HIGH NE SPACE.
READ TABLE OBJS WITH KEY NAME = PARMS-SELNAME.
WRITE : /2 PARMS-SELNAME, OBJS-TEXT,
45 PARMS-KIND,
PARMS-SIGN,
PARMS-OPTION,
PARMS-LOW,
PARMS-HIGH.
NEW-LINE.
ENDLOOP.
SKIP.
ENDIF.
some other approach....
This function module selects the Selection Screen contents
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = sy-repid
TABLES
selection_table = loc_int_tab
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE i000 WITH 'Error in RS_REFRESH_FROM_SELECTOPTIONS'(029).
LEAVE LIST-PROCESSING.
ENDIF.
Craete the variant VAR1
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
curr_report = sy-repid
curr_variant = wf_variant
vari_desc = loc_varid
TABLES
vari_contents = loc_int_tab
vari_text = loc_varit
EXCEPTIONS
illegal_report_or_variant = 1
illegal_variantname = 2
not_authorized = 3
not_executed = 4
report_not_existent = 5
report_not_supplied = 6
variant_exists = 7
variant_locked = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE i000 WITH 'Error while creating dynamic variant'(028).
LEAVE LIST-PROCESSING.
ENDIF.
reward point if helpful.
thanks
mrutyun^ -
Changing CSS for form field elements?
Hi,
Is there a way we can change the CSS for Form text fields in APEX 4.1 so that they look a little better? Or is the .css file located somewhere where we can just go and change?
Thanks,
SunHi,
If you are referring to changing the CSS properties then you can do that.
Add /override styles to the page item's HTML Form Element Attributes
style="<cssproperty1>:<value1>;<cssproperty2>:<value2>;"
e.g.
style="background-color:red;color:yellow;"Red/yellow is certainly not "looking better", the idea is to give you the direction.
If you know the class of the item(s) then you can change the styles by overriding the built-in style of the template by adding the <style> in the Page HTML
Header as well.
Or, define your own class, add the class to the HTML Form Element Attributes field and adding the style in the Page HTML Header.
regards, -
Dynamically table for sapscript
hi expects,
how could i create dynamical table for form in script.hi,
to pass the table to script means passing a field sting to script by using function module write_form.
example program,
TABLES: SPFLI,SFLIGHT.
DATA: BEGIN OF FS_SFLIGHT,
CARRID TYPE SPFLI-CARRID,
CONNID TYPE SPFLI-CONNID,
FLDATE TYPE SFLIGHT-FLDATE,
CITYFROM TYPE SPFLI-CITYFROM,
CITYTO TYPE SPFLI-CITYTO,
END OF FS_SFLIGHT.
TABLES SCARR.
DATA T_SCARR LIKE STANDARD TABLE OF SCARR.
DATA: W_LINES TYPE I,
W_P TYPE I,
W_TEMP TYPE I .
DATA T_FLIGHT LIKE STANDARD TABLE OF FS_SFLIGHT.
SELECT SPFLI~CARRID
SPFLI~CONNID
SFLIGHT~FLDATE
SPFLI~CITYFROM
SPFLI~CITYTO
INTO CORRESPONDING FIELDS OF TABLE T_FLIGHT
FROM SPFLI AS SPFLI JOIN SFLIGHT AS SFLIGHT
ON SPFLICARRID = SFLIGHTCARRID AND
SPFLICONNID = SFLIGHTCONNID
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'YH648_060104'
LANGUAGE = SY-LANGU
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
SPONUMIV =
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
CODEPAGE = 11
OTHERS = 12
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DESCRIBE TABLE T_FLIGHT LINES W_LINES.
LOOP AT T_FLIGHT INTO FS_SFLIGHT.
ADD 1 TO W_TEMP.
IF W_LINES NE W_TEMP.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'BOXES'
FUNCTION = 'SET'
TYPE = 'TOP'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
IF W_TEMP NE W_LINES.
AT NEW CONNID.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'DATA'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDAT.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'DATA1'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE.
SELECT CARRID CARRNAME
FROM SCARR
INTO TABLE T_SCARR.
LOOP AT T_SCARR INTO SCARR.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'PROTECT1'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'WINDOW2'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
IF W_LINES NE W_TEMP.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'LAST'
FUNCTION = 'SET'
TYPE = 'TOP'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
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 draw boxes on script the syntax will be
Boxes, Lines, Shading: BOX, POSITION, SIZE
Use the BOX, POSITION, and SIZE commands for drawing boxes, lines, and shading to print particular windows within a form or passages of text within a window in a frame or with shading.
The SAP printer drivers that are based on page-oriented printers (the HP LaserJet driver HPL2, the Postscript driver POST, the Kyocera Prescribe driver PRES) employ these commands when printing. Line printers and page-oriented printers not supported in the standard ignore these commands. You can view the resulting printer output in the SAPscript print preview.
Syntax:
/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
/: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
/: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
BOX Command
Syntax
/: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
Effect: draws a box of the specified size at the specified position.
Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT, and FRAME, you must specify both a measurement and a unit of measurement. Specify the INTENSITY parameter as a percentage between 0 and 100.
XPOS, YPOS
Upper left corner of the box, relative to the values of the POSITION command.
Default: Values specified in the POSITION command.
The following calculation is performed internally to determine the absolute output position of a box on the page:
X(abs) = XORIGIN + XPOS
Y(abs) = YORIGIN + YPOS
WIDTH
Width of the box. Default: WIDTH value of the SIZE command.
HEIGHT
Height of the box. Default: HEIGHT value of the SIZE command.
FRAME
Thickness of frame.
Default: 0 (no frame).
INTENSITY
Grayscale of box contents as %.
Default: 100 (full black)
Measurements: You must specify decimal numbers as literal values (like ABAP numeric constants) by enclosing them in inverted commas. Use the period as the decimal point character. See also the examples listed below.
Units of measurement: The following units of measurement may be used:
TW (twip)
PT (point)
IN (inch)
MM (millimeter)
CM (centimeter)
LN (line)
CH (character).
The following conversion factors apply:
1 TW = 1/20 PT
1 PT = 1/72 IN
1 IN = 2.54 CM
1 CM = 10 MM
1 CH = height of a character relative to the CPI specification in the form header
1 LN = height of a line relative to the LPI specification in the form header
/: BOX FRAME 10 TW
Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
/: BOX INTENSITY 10
Fills the window background with shading having a gray scale of 10 %.
/: BOX HEIGHT 0 TW FRAME 10 TW
Draws a horizontal line across the complete top edge of the window.
/: BOX WIDTH 0 TW FRAME 10 TW
Draws a vertical line along the complete height of the left hand edge of the window.
/: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
POSITION Command
Syntax
/: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
Effect: Sets the origin for the coordinate system used by the XPOS and YPOS parameters of the BOX command. When a window is first started, the POSITION value is set to refer to the upper left corner of the window (default setting).
Parameters: If a parameter value does not have a leading sign, then its value is interpreted as an absolute value, in other words, as a value that specifies an offset from the upper left corner of the output page. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. If one of the parameter specifications is missing, then no change is made to this parameter.
XORIGIN, YORIGIN
Origin of the coordinate system.
WINDOW
Sets the values for the left and upper edges to match those of the current window (default setting).
PAGE
Sets the values for the left and upper edges to match those of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm).
/: POSITION WINDOW
Sets the origin for the coordinate system to the upper left corner of the window.
/: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'
Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page.
/: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM
Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.
SIZE Command
Syntax
/: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
Effect: Sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a window is first started, the SIZE value is set to the same values as the window itself (default setting).
Parameters: If one of the parameter specifications is missing, then no change is made to the current value of this parameter. If a parameter value does not have a leading sign, then its value is interpreted as an absolute value. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value.
WIDTH, HEIGHT
Dimensions of the rectangle or line.
WINDOW
Sets the values for the width and height to the values of the current window (default setting).
PAGE
Sets the values for the width and height to the values of the current output page.
/: SIZE WINDOW
Sets WIDTH and HEIGHT to the current window dimensions.
/: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM
Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.
/: POSITION WINDOW
/: POSITION XORIGIN -20 TW YORIGIN -20 TW
/: SIZE WIDTH +40 TW HEIGHT +40 TW
/: BOX FRAME 10 TW
A frame is added to the current window. The edges of the frame extend beyond the edges of the window itself, so as to avoid obscuring the leading and trailing text characters. -
Dynamic generation of form to show table entries
Dear experts,
I am aware of how to dynamically program for form generation when the layout static and is already defined in transaction SFP.
However I have a requirement wherein the form layout is not available . But the form should get generated dynamically and display values from a table in a simple field - value format. ( Just the way SE16 displays table content , the only difference being output should be in a PDF)
Any pointers how I can progress on this.
Appreciated your inputs.
Thank you.
With regards,
Sahir.How does default checked checkboxes work for checkboxes of type String[]?
The following code works, but it is for form property of type String, instead of String[]:
<form-property name="prop" type="java.lang.String" />
form.set("prop", "true");
<html:checkbox property="prop" value="true"> // checked by defaultThis is what I tried for type String[], modelling it off the ideas of the above code, but it does not work:
<form-property name="prop" type="java.lang.String[]" />
String[] propArray = {"1", "4"};
form.set("prop", propArray[]);
<html:checkbox property="prop" value="1"> //should be checked by default, but is not
<html:checkbox property="prop" value="2">
<html:checkbox property="prop" value="3">
<html:checkbox property="prop" value="4"> //should be checked by default, but is notWhy does it work for String but not String[]? How do I make it so that they are checked by default for type String[]? -
Alv interactive report for secondary list
Hi All,
This is my code for ALV interactive report. Its working Properly for me when i select material number iam able to display the secondary list properly . if i sorted the basic list other than material number for ex . created date . iam uable to display correct secondary list . Can any one help me in this issue?
REPORT ZWRLOMDMM_PMG_PHWEB_PLD NO STANDARD PAGE HEADING
LINE-SIZE 120
LINE-COUNT 65
MESSAGE-ID 00.
TABLES *
TABLES: MARA , "General Material Data
ZWPBPH. " Published Product Hierarchy
TYPE-POOLS *
TYPE-POOLS:SLIS .
DATA:FIELDCATALOG_BASIC TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
FIELDCATALOG_SECONDARY TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
GD_TAB_GROUP TYPE SLIS_T_SP_GROUP_ALV,
GD_LAYOUT TYPE SLIS_LAYOUT_ALV,
GD_REPID LIKE SY-REPID.
INTERNAL TABLES *
*Internal Tables to Get Data.
*Internal Table For MARA Table.
DATA:BEGIN OF T_MARA OCCURS 0 ,
MATNR LIKE MARA-MATNR,
MTART LIKE MARA-MTART,
ERSDA LIKE MARA-ERSDA,
ERNAM LIKE MARA-ERNAM,
AENAM LIKE MARA-AENAM,
SPART LIKE MARA-SPART,
END OF T_MARA.
*Internal Table For ZWPBPH Table.
DATA:BEGIN OF T_ZWPBPH OCCURS 0 ,
PBPINO LIKE ZWPBPH-PBPINO,
PBPAPINO LIKE ZWPBPH-PBPAPINO,
END OF T_ZWPBPH.
*Internal Table For Basic List Field Catalog.
DATA:BEGIN OF T_ALV OCCURS 0 ,
MATNR LIKE MARA-MATNR,
MTART LIKE MARA-MTART,
ERSDA LIKE MARA-ERSDA,
ERNAM LIKE MARA-ERNAM,
SPART LIKE MARA-SPART,
SPART1(3),
END OF T_ALV.
*Internal Table For Secondary List Field Catalog.
DATA: BEGIN OF T_ALVS OCCURS 0 ,
MATNR LIKE MARA-MATNR,
AENAM LIKE MARA-AENAM,
LAEDA LIKE MARA-LAEDA,
END OF T_ALVS.
*Internal Table For Model
DATA:T_MODEL LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
*Internal Table For Product
DATA:T_PRODUCT LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
*Internal Table For Family
DATA:T_FAMILY LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
*Internal Table For Line
DATA:T_LINE LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
*Internal Table For Type
DATA:T_TYPE LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: P_MATN RADIOBUTTON GROUP R1 USER-COMMAND run default 'X'.
SELECT-OPTIONS: P_MATNR FOR MARA-MATNR MODIF ID SC1 .
PARAMETERS: P_DAT RADIOBUTTON GROUP R1 .
SELECT-OPTIONS: : P_DATE FOR MARA-LAEDA MODIF ID SC2.
PARAMETERS: P_DIV RADIOBUTTON GROUP R1 .
SELECT-OPTIONS: : P_DIVIS for mara-spart MODIF ID SC3.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION *
INITIALIZATION.
REFRESH: T_MARA,
T_ZWPBPH,
T_ALV,
T_ALVS,
T_MODEL,
T_PRODUCT,
T_FAMILY,
T_LINE,
T_TYPE.
CLEAR: T_MARA,
T_ZWPBPH,
T_ALV,
T_ALVS,
T_MODEL,
T_PRODUCT,
T_FAMILY,
T_LINE,
T_TYPE.
GD_REPID = SY-REPID.
*AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF P_MATN = 'X'.
FREE : P_DIVIS,P_DATE.
IF SCREEN-GROUP1 = 'SC2' or SCREEN-GROUP1 = 'SC3'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
CONTINUE.
ENDIF .
ENDIF.
IF P_DAT = 'X'.
FREE : P_MATNR,P_DIVIS.
IF SCREEN-GROUP1 = 'SC1' or SCREEN-GROUP1 = 'SC3'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
CONTINUE.
ENDIF .
ENDIF.
IF P_DIV = 'X'.
FREE : P_DATE,P_MATNR.
IF SCREEN-GROUP1 = 'SC1' or SCREEN-GROUP1 = 'SC2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
CONTINUE.
ENDIF .
ENDIF.
ENDLOOP.
START-OF-SELECTION *
START-OF-SELECTION.
PERFORM GET_FIELDCATALOG_BASIC.
PERFORM GET_FIELDCATALOG_SECONDARY.
PERFORM POPULATE_DATA.
END-OF-SELECTION *
END-OF-SELECTION.
*& FORM GET_FIELDCATALOG_BASIC.
Get Fieldcatalog For Basic List
FORM GET_FIELDCATALOG_BASIC.
FIELDCATALOG_BASIC-FIELDNAME = 'MATNR'.
FIELDCATALOG_BASIC-SELTEXT_M = 'Material Number'.
FIELDCATALOG_BASIC-COL_POS = 0.
FIELDCATALOG_BASIC-OUTPUTLEN = 20.
FIELDCATALOG_BASIC-HOTSPOT = 'X'.
FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
FIELDCATALOG_BASIC-KEY = 'X'.
APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
CLEAR FIELDCATALOG_BASIC.
FIELDCATALOG_BASIC-FIELDNAME = 'MTART'.
FIELDCATALOG_BASIC-SELTEXT_M = 'Material Type'.
FIELDCATALOG_BASIC-COL_POS = 0.
FIELDCATALOG_BASIC-OUTPUTLEN = 20.
FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
FIELDCATALOG_BASIC-KEY = 'X'.
APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
CLEAR FIELDCATALOG_BASIC.
FIELDCATALOG_BASIC-FIELDNAME = 'ERSDA'.
FIELDCATALOG_BASIC-SELTEXT_M = 'Created Date'.
FIELDCATALOG_BASIC-COL_POS = 0.
FIELDCATALOG_BASIC-OUTPUTLEN = 12.
FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
FIELDCATALOG_BASIC-KEY = 'X'.
APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
CLEAR FIELDCATALOG_BASIC.
FIELDCATALOG_BASIC-FIELDNAME = 'ERNAM'.
FIELDCATALOG_BASIC-SELTEXT_M = 'Created By'.
FIELDCATALOG_BASIC-COL_POS = 0.
FIELDCATALOG_BASIC-OUTPUTLEN = 15.
FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
FIELDCATALOG_BASIC-KEY = 'X'.
APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
CLEAR FIELDCATALOG_BASIC.
FIELDCATALOG_BASIC-FIELDNAME = 'SPART'.
FIELDCATALOG_BASIC-SELTEXT_M = 'Division PMG'.
FIELDCATALOG_BASIC-COL_POS = 0.
FIELDCATALOG_BASIC-OUTPUTLEN = 14.
FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
FIELDCATALOG_BASIC-KEY = 'X'.
APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
CLEAR FIELDCATALOG_BASIC.
FIELDCATALOG_BASIC-FIELDNAME = 'SPART1'.
FIELDCATALOG_BASIC-SELTEXT_M = 'Division PhWEB'.
FIELDCATALOG_BASIC-COL_POS = 0.
FIELDCATALOG_BASIC-OUTPUTLEN = 14.
FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
FIELDCATALOG_BASIC-KEY = 'X'.
APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
CLEAR FIELDCATALOG_BASIC.
ENDFORM. "GET_FIELDCATALOG_BASIC
*& FORM GET_FIELDCATALOG_SECONDARY
Get Fieldcatalog For Secondary List
FORM GET_FIELDCATALOG_SECONDARY.
FIELDCATALOG_SECONDARY-FIELDNAME = 'MATNR'.
FIELDCATALOG_SECONDARY-SELTEXT_M = 'Material Number'.
FIELDCATALOG_SECONDARY-COL_POS = 0.
FIELDCATALOG_SECONDARY-OUTPUTLEN = 20.
FIELDCATALOG_SECONDARY-EMPHASIZE = 'X'.
FIELDCATALOG_SECONDARY-KEY = 'X'.
APPEND FIELDCATALOG_SECONDARY TO FIELDCATALOG_SECONDARY.
CLEAR FIELDCATALOG_SECONDARY.
FIELDCATALOG_SECONDARY-FIELDNAME = 'AENAM'.
FIELDCATALOG_SECONDARY-SELTEXT_M = 'Changed By'.
FIELDCATALOG_SECONDARY-COL_POS = 0.
FIELDCATALOG_SECONDARY-OUTPUTLEN = 20.
FIELDCATALOG_SECONDARY-EMPHASIZE = 'X'.
FIELDCATALOG_SECONDARY-KEY = 'X'.
APPEND FIELDCATALOG_SECONDARY TO FIELDCATALOG_SECONDARY.
CLEAR FIELDCATALOG_SECONDARY.
FIELDCATALOG_SECONDARY-FIELDNAME = 'LAEDA'.
FIELDCATALOG_SECONDARY-SELTEXT_M = 'Changed ON'.
FIELDCATALOG_SECONDARY-COL_POS = 0.
FIELDCATALOG_SECONDARY-OUTPUTLEN = 20.
FIELDCATALOG_SECONDARY-EMPHASIZE = 'X'.
FIELDCATALOG_SECONDARY-KEY = 'X'.
APPEND FIELDCATALOG_SECONDARY TO FIELDCATALOG_SECONDARY.
CLEAR FIELDCATALOG_SECONDARY.
ENDFORM. "GET_FIELDCATALOG_SECONDARY
*& FORM POPULATE_DATA
FORM POPULATE_DATA.
*Get Data From MARA And ZWPBPH Tables
IF P_MATN = 'X'.
SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA
where MATNR IN P_MATNR .
IF SY-SUBRC <> 0.
MESSAGE E001(0) WITH 'Invalid Material Number'.
ENDIF.
ELSEIF P_DAT = 'X'.
SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA
where LAEDA IN P_DATE .
IF SY-SUBRC <> 0.
MESSAGE E001(0) WITH 'Invalid Date Range'.
ENDIF.
ELSEIF P_DIV = 'X'.
SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA
where SPART IN P_DIVIS .
IF SY-SUBRC <> 0.
MESSAGE E001(0) WITH 'Invalid Division'.
ENDIF.
ELSEIF P_MATN = ' ' AND P_DAT = ' ' AND P_DIV = ' '.
SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA.
ENDIF.
DELETE ADJACENT DUPLICATES FROM T_MARA COMPARING MATNR.
SORT T_MARA BY MATNR.
IF T_MARA[] IS NOT INITIAL .
SELECT PBPINO PBPAPINO FROM ZWPBPH INTO TABLE T_ZWPBPH FOR ALL ENTRIES
IN T_MARA WHERE PBPINO = T_MARA-MATNR.
ENDIF.
IF SY-SUBRC = 0.
LOOP AT T_ZWPBPH.
SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH INTO T_MODEL WHERE
PBPINO = T_ZWPBPH-PBPAPINO.
IF SY-SUBRC = 0.
SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH INTO T_PRODUCT WHERE
PBPINO
= T_MODEL-PBPAPINO.
ENDIF.
IF SY-SUBRC = 0.
SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH INTO T_FAMILY WHERE
PBPINO = T_PRODUCT-PBPAPINO.
ENDIF.
IF SY-SUBRC = 0.
SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH INTO T_LINE WHERE
PBPINO = T_FAMILY-PBPAPINO.
ENDIF.
IF SY-SUBRC = 0.
SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH INTO T_TYPE WHERE PBPINO
= T_LINE-PBPAPINO.
ENDIF.
IF SY-SUBRC = 0.
SELECT SINGLE MTART ERSDA ERNAM SPART FROM MARA INTO CORRESPONDING
FIELDS OF T_ALV WHERE MATNR = T_ZWPBPH-PBPINO AND SPART <>
T_TYPE-PBPAPINO+1(2).
ENDIF.
IF SY-SUBRC = 0.
MOVE T_ZWPBPH-PBPINO TO T_ALV-MATNR.
MOVE T_TYPE-PBPAPINO+1(2) TO T_ALV-SPART1.
APPEND T_ALV.
SELECT SINGLE MATNR AENAM LAEDA FROM MARA INTO CORRESPONDING
FIELDS OF T_ALVS WHERE MATNR = T_ZWPBPH-PBPINO.
APPEND T_ALVS.
CLEAR T_ALVS.
ENDIF.
ENDLOOP.
ENDIF.
SORT T_ALV BY MATNR.
SORT T_ALVS BY MATNR.
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = GD_REPID
i_callback_user_command = 'DISPLAY_DETAIL'
it_fieldcat = FIELDCATALOG_BASIC[]
i_save = 'X'
TABLES
t_outtab = T_ALV
EXCEPTIONS
program_error = 1
others = 2.
ENDFORM. "POPULATE_DATA
*& Form DISPLAY_DETAIL
text
-->UCOMM text
-->SELFIELD text
FORM DISPLAY_DETAIL USING UCOMM LIKE SY-UCOMM
SELFIELD TYPE SLIS_SELFIELD.
Select Material Number For Secondary List
DATA: T_ALV_TEMP LIKE T_ALVS OCCURS 0 WITH HEADER LINE.
IF UCOMM = '&IC1'.
READ TABLE T_ALVS INDEX SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
MOVE T_ALVS TO T_ALV_TEMP.
APPEND T_ALV_TEMP.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = GD_REPID
it_fieldcat = FIELDCATALOG_SECONDARY[]
TABLES
t_outtab = T_ALV_TEMP.
ENDIF.
ENDFORM. "DISPLAY_DETAILHi,
Try this in the routine display details
READ TABLE T_ALV INDEX SELFIELD-TABINDEX.
READ TABLE T_ALVS with key matnr = T_ALV-MATNR
thanks
Maybe you are looking for
-
How to check how many adobe forms are in use cross systems or locally
Hello, we want to check that we are not using to many adobe forms within our SAP system. Is there an easy way to get this information out of sap ? please guide. (TC or Report) thanks JR
-
Hi, I'm working on Weblogic Workshop 10gR3. I've used OpenJPA as JPA provider. I've generated Entity beans from database connection in DB Explorer. I'm getting the following exception: find all failed<openjpa-1.1.0-r422266:657916 fatal user error> or
-
DVD READER STOP WORKING AFTER ITUNES IS INSTALLED
FINNALLY GOT ITUNES AND QUICKTIME TO WORK BUT NOW MY COMPUTER WON'T RECONIZE MY DVD BURNER. IT DOES RECONIZE A USB EXTEROR BURNER. IF I UNINSTALL ITUNES AND QUICK TIME MY INTERNAL BURNER WORKS. PLEASE HELP
-
CS4 "Already in use cannot delete" over network problem
Hello, I am having a problem with a Mac on OS X not being able to open or delete any .ai files over a network on a Dell Server running Windows Server 2008. If we try to open or delete the file I get an error message "Already in use cannot delete". Al
-
Hi All, I just got a new iMac 24" (replacement for a lemon 20") and the disc drive seems to be extremely loud (much louder than my previous 2 iMacs) not only when ingesting and ejecting a disc but also when searching and reading. Any thoughts?