Check-box "Multiline" in receiver condition
Hi,
Inside a Receiver Determination, it's possible to define a condition in order to allow (or not) the sending to a service.
In the "Expression Editor" windows, what is the rule of the <b>check-box "Multiline"</b> ?
Because when I use it and when I don't use it, I have always the same result.
Regards
Mickael.
P.S: I'm in XI 3.0 SP11.
Hi Mikael,
The purpose of this field is to notify the condition builder that the XPATH expression is going to return more than one line. So if you're XPATH is looking up for instance a customer name and this field occurs 3 times the result of the XPATH will be:
Name1
Name2
Name3
When the operator is for instance "=" then all these values will be checked for a match.
More information about this can be found at the link below:
http://help.sap.com/saphelp_nw04/helpdata/en/ab/13bf7191e73a4fb3560e767a2525fd/content.htm
Kind Regards,
Ramon Boekel
Similar Messages
-
Post Author: hteoh
CA Forum: Publishing
I have an BO related issue. I tried to schedule a smtp event in BO to email the report output as Excel. Since this report will go to different users, I unchecked the Use the Job Server's defaults (CHECK BOX). For some reason, I can't check the Add Attachment(CHECK BOX). I received the email but without attachement. Do you know why I can't use attachment. The SMTP event works perfectly if I check Use the Job Server's defaults.Hi!
Use the below code to populate the Sender and receiver mail ids:
DATA GV_SENDER TYPE SWC_OBJECT.
DATA GV_SENDER_ID LIKE SWOTOBJID.
SWC_CONTAINER LT_CONTAINER.
reset data for CTCV
CALL FUNCTION 'CTCV_INIT_USER_DATA'.
Create sender using sender mail address from new table
SWC_CLEAR_CONTAINER LT_CONTAINER.
SWC_CREATE_OBJECT GV_SENDER 'RECIPIENT' SPACE.
SWC_SET_ELEMENT LT_CONTAINER 'AddressString'
ZMAIL-SENDER.
SWC_SET_ELEMENT LT_CONTAINER 'TypeID' 'B'.
SWC_CALL_METHOD GV_SENDER 'CreateAddress' LT_CONTAINER.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
RAISING SENDER_CREATION_FAILED.
ENDIF.
SWC_OBJECT_TO_PERSISTENT GV_SENDER GV_SENDER_ID.
Similarly you can create the recipient mail id. Pass the GV_SENDER_ID to OPEN_FORM.
Cheers! -
Fetching sub-screen check box value in module pool
Hi,
i hav a req in which i craeted a sub-screen in a standard sap screen QA11 using screen -exit.
This sub-screen has two check box's for 2 approvals.I hav craeted as screen with this 2 check box and made that as a sub-screen to main screen.
I hav few validations to be performed on these 2 check-boxes.
1.Enabling and disabling of resp check-box based on some condition.This is happening as i hav written some logic in PBO of the screen.
2.Validations hav to be performed on the check-box like if user clicks a check-box that value has to be captured and stored in a Z custom table.My main issue comes here.i hav written some code in PAI,but when i put a break-point,that code is not at all getting triggered.
Kindly,let me know how can i get the check-box value from the sub-screen which is craeted in the standard screen of QA11 using screen-exit.
Thanks in advanceHi,
May be your code is written in PAI of some other screen.
check SY-DYNNR and also use this where you are checking chekbox value.
make sure your code is written in PAI of same subscreen
Thanks
Raghav M. -
I have a form called myForm. On this form is a check box called myCheckBox. I also have a text box labeled myTextBox. I have assigned a macro, myMacro, to run upon selection/click of myCheckBox. The macro is an If statement which determines if myCheckBox
is checked or not checked and spits out a value, "Yes" or "No" for example, into the text box.
I am not able to get text to display into the text box although I am not receiving any errors when I run the macro. This may be a fault in my logic and would like help resolving where the problem lies. I am fairly new to Access so this could be something
simple.
My code is as follows:
If Forms!myForm = True Then
Forms!myForm!myTextBox.Value = "Yes!"
ElseIf Forms!myForm = False Then
Forms!myForm!myTextBox.Value = "No!"
Else
Forms!myForm!myTextBox.Value = " / ERROR / "
End if
Thanks!Hi,
This is the forum to discuss questions and feedback for Microsoft Office, the issue is more related to coding/programing, you'd better post your question to the MSDN forum for Access
http://social.msdn.microsoft.com/Forums/en-US/home?forum=accessdev&filter=alltypes&sort=lastpostdesc
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
George Zhao
TechNet Community Support -
How to disable and enable Check box based upon condition
Hi,
I wants to disable/hide the check box field before the required field is filled. Kindly help meHi Mohammed,
Try to use customize InfoPath form, add rules. Go to list tab, click customize Form, then this opens the list form in InfoPath
format.
1.Select the check box field control, click add rules, select if is blank, show validation error action.
2.Then go to conditions, click column name is blank, change it to the required column you want.
3.Go to rule type, click validation, change it to formatting, select hide this control.
4.Publish the InfoPath form.
Best Regards.
Kelly Chen
TechNet Community Support -
Reading check boxi n a multiline classical report...
hi,
in my report, i have multiline data displayed...like for e.g.
first line displays shipment data, second line is a continuation of shipment data. third line is a header line to show deliveries under that shipment, fourth line shows the deliveries , one per line and then next shipment and so on.
now the first line of every shipment has a checkbox displayed.
when the user finally chooses to print this report, i need to read only those shipments that are selecte by user and process only them.
this is a simple classical report. please tell me how to write the code to capture the checkbox selection.
thksPlease don't duplicate the Post: handling check box in a report...
Logic for Reading Checkbox values will remain same as per my reply in your previous post.
The only thing you have to make sure is, don't write anything under the Checkbox field... Generally, in this type of requirement you should write your Checkbox in 1st or 2nd place and than start all your data from 5th place onwards.
Regards,
Naimesh Patel -
Agree to terms and conditions check box
I am using a checkbox for users to indicate that they agree to the forms terms and conditions. On Submit how can I validate that the box was checked and if not block the Submit process from completing until the checkbox is selected.
Make the submit button presence 'hidden', add a second button that performs the check box validation and if the validation succeeds, call 'click' on the submit button.
// form1.page1.subform1.callSubmitBtn::click - (JavaScript, client)
if (form1.page1.subform1.cb.rawValue == "0") {
xfa.host.messageBox("Please agree to terms and conditions.","Agree",0);
else {
form1.page1.subform1.submitBtn.execEvent("click");
Steve -
Can any one please give me any test program for displaying checkboxes in the ALV Report Layout .
Points will be rewarded even for helpfull answers.
Thanks ,
Veerendranath Maddula.Hi Veerendranath,
below is the sample code for that,
TYPES:
BEGIN OF TY_VB_AKAP,
VBELN TYPE VBELN_VA, "Sales Document
KUNNR TYPE KUNAG, "Sold-to party
POSNR TYPE POSNR_VA, "Item Number
MATNR TYPE MATNR, "Material Number
PMATN TYPE PMATN, "Pricing Reference Material/Newly Created Material
KWMENG TYPE KWMENG, "Cumulative Order Qty. in Sales Units
VRKME TYPE VRKME, "Sales Unit
KZWI1 TYPE KZWI1, "Sub Total 1 from pricing procedure for condition
VKAUS TYPE ABRVW, "Usage Indicator
WAERK TYPE WAERK, "SD Document Currency
END OF TY_VB_AKAP,
BEGIN OF TY_MARA,
MATNR TYPE MATNR, "Material Number
ZZTECHSPEC TYPE ZTECHSPEC, "Technical Specification
END OF TY_MARA,
BEGIN OF TY_MVKE,
MATNR TYPE MATNR, "Material Number
VKORG TYPE VKORG, "Sales Organization
VTWEG TYPE VTWEG, "Distribution Channel
KONDM TYPE KONDM, "Material Pricing Group
*--Begin of changes for the change request 2007096--26th July 2007--
VRKME TYPE VRKME, "Sales Unit according to the Material Master
*--End of changes for the change request 2007096--26th July 2007--
END OF TY_MVKE,
BEGIN OF TY_VBKD,
VBELN TYPE VBELN_VA, "Sales Document
POSNR TYPE POSNR_VA, "Item Number
BSTKD_E TYPE BSTKD_E, "Used to capture New Material Number
END OF TY_VBKD,
BEGIN OF TY_IHEADER,
SELECT(1) TYPE C, "Check Box
VBELN TYPE VBELN, "Sales Document
KUNNR TYPE KUNAG, "Sold-to Party
END OF TY_IHEADER,
BEGIN OF TY_MESSAGE1,
VKORG TYPE VKORG, "Sales Organization
VTWEG TYPE VTWEG, "Distribution Channel
KUNNR TYPE KUNAG, "Customer number
KONDM TYPE KONDM, "Material pricing group
ZCOUNT(2) TYPE N, "Zcount
MSGTYP(1) TYPE C, "Message type
TEXT TYPE STRING, "Message text
END OF TY_MESSAGE1,
*--Begin of changes for the change request 2007106--25th July 2007--
BEGIN OF TY_MESSAGE1_2,
VKORG TYPE VKORG, "Sales Organization
VTWEG TYPE VTWEG, "Distribution Channel
KUNNR TYPE KUNAG, "Customer number
KONDM TYPE KONDM, "Material pricin
MSGTYP(1) TYPE C, "Message type
TEXT TYPE STRING, "Message text
END OF TY_MESSAGE1_2,
*--End of changes for the change request 2007106--25th July 2007--
BEGIN OF TY_MESSAGE2,
VKORG TYPE VKORG, "Sales Organization
VTWEG TYPE VTWEG, "Distribution Channel
KUNNR TYPE KUNAG, "Customer number
MATNR TYPE MATNR, "Material Number
MSGTYP(1) TYPE C, "Message type
TEXT TYPE STRING, "Message text
END OF TY_MESSAGE2,
BEGIN OF TY_IFINAL,
VBELN TYPE VBELN_VA, "Sales Document
KWMENG TYPE KWMENG, "Cumulative Order Qty. in Sales Units
POSNR TYPE POSNR_VA, "Item Number
KUNNR TYPE KUNAG, "Sold-to party
MATNR TYPE MATNR, "Material Number
VRKME TYPE VRKME, "Sales Unit
KZWI1 TYPE KZWI1, "Sub Total 1 from pricing procedure for condition
VKAUS TYPE ABRVW, "Usage Indicator
ZZTECHSPEC TYPE ZTECHSPEC, "Technical Specification
PMATN TYPE PMATN, "Pricing Reference Material/Newly Created Material
KONDM TYPE KONDM, "Material Pricing Group
*--Begin of changes for the change request 2007096--26th July 2007--
WAERK TYPE WAERK, "SD Document Currency
*--End of changes for the change request 2007096--26th July 2007--
END OF TY_IFINAL,
BEGIN OF TY_ACC1,
VBELN TYPE VBELN_VA, "Sales Document
KUNNR TYPE KUNAG, "Sold-to party
KONDM TYPE KONDM, "Material Pricing Group
ZCOUNT(2) TYPE N, "ZCount indicator
KSTBM TYPE KSTBM, "Quantity
VRKME TYPE VRKME, "Sales Unit
ZZTECHSPEC TYPE ZTECHSPEC, "Technical Specification
KZWI1 TYPE KZWI1, "Sub Total 1 from pricing procedure for condition
ERROR(1) TYPE N, "Error Field
*--Begin of changes for the change request 2007096--26th July 2007--
WAERK TYPE WAERK, "SD Document Currency
*--End of changes for the change request 2007096--26th July 2007--
END OF TY_ACC1,
Important Note : Earlier there were only three accesses and hence this below type was coded as TY_ACC2 depicting
the type for internal table as a holder of data for second access sequence, but later a new access sequence was
introduced and was introduced as the second access by itself and hence the sequence which was previously considered
as second access is going to be third access sequence in reality. The naming standards that are going to be followed
for the newly introduced access sequence would be XXX_1_2. (For Change request 2007106)
BEGIN OF TY_ACC2,
VBELN TYPE VBELN_VA, "Sales Document
KUNNR TYPE KUNAG, "Sold-to party
MATNR TYPE MATNR, "Material Number
KSTBM TYPE KSTBM, "Cumulative Order Qty. in Sales Units
ZZTECHSPEC TYPE ZTECHSPEC, "Technical Specification
VRKME TYPE VRKME, "Sales Unit
KZWI1 TYPE KZWI1, "Sub Total 1 from pricing procedure for condition
ERROR(1) TYPE N, "Error field
*--Begin of changes for the change request 2007096--26th July 2007--
WAERK TYPE WAERK, "SD Document Currency
*--End of changes for the change request 2007096--26th July 2007--
END OF TY_ACC2,
*--Begin of changes for the change request 2007106--24th July 2007--
BEGIN OF TY_ACC1_2,
VBELN TYPE VBELN_VA, "Sales Document
KUNNR TYPE KUNAG, "Sold-to party
KONDM TYPE KONDM, "Material Pricing Group
KSTBM TYPE KSTBM, "Quantity
VRKME TYPE VRKME, "Sales Unit
ZZTECHSPEC TYPE ZTECHSPEC, "Technical Specification
KZWI1 TYPE KZWI1, "Sub Total 1 from pricing procedure for condition
ERROR(1) TYPE N, "Error field
*--Begin of changes for the change request 2007096--26th July 2007--
WAERK TYPE WAERK, "SD Document Currency
*--End of changes for the change request 2007096--26th July 2007--
END OF TY_ACC1_2,
*--End of changes for the change request 2007106--24th July 2007--
*--Begin of changes for the change request 2007096--26th July 2007--
BEGIN OF TY_T006,
MSEHI TYPE MSEHI, "Unit of Measurement
ZAEHL TYPE DZAEHL, "Numerator for conversion to SI unit
NENNR TYPE NENNR, "Denominator for conversion into SI unit
END OF TY_T006,
*--End of changes for the change request 2007096--26th July 2007--
*--Begin of changes for the change request xxx--2nd Aug 2007--
*Types of MARM table
BEGIN OF TY_MARM,
MATNR TYPE MATNR, " Material Number
MEINH TYPE LRMEI, " Alternative Unit of Measure
UMREZ TYPE UMREZ, " Numerator for Conversion to Base UOM
UMREN TYPE UMREN, " Denominator for Conversion to Base UOM
END OF TY_MARM.
*--End of changes for the change request xxx--2nd Aug 2007--
D A T A *
Internal Table Declarations
DATA: T_FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV, "Fieldcatalog IT
T_EVENTS TYPE SLIS_T_EVENT, "Event IT
T_HEADER TYPE SLIS_T_LISTHEADER, "Header IT
T_VB_AKAP TYPE STANDARD TABLE OF TY_VB_AKAP, "To hold records from VBAK & VBAP Table
T_MARA TYPE STANDARD TABLE OF TY_MARA, "To hold records from MARA Table
T_MVKE TYPE STANDARD TABLE OF TY_MVKE, "To hold records from MVKE Table
T_VBKD TYPE STANDARD TABLE OF TY_VBKD, "To hold records from VBKD Table
T_IHEADER TYPE STANDARD TABLE OF TY_IHEADER, "To hold records from VBAK Table
T_IFINAL TYPE STANDARD TABLE OF TY_IFINAL, "To hold cumulative data for ALV
T_BDCDATA TYPE STANDARD TABLE OF BDCDATA, "IT for bdcdata
T_BDCMSGCOLL TYPE STANDARD TABLE OF BDCMSGCOLL, "IT for error messages
T_MESSAGE1 TYPE STANDARD TABLE OF TY_MESSAGE1, "IT for conditions1 messages
*--Begin of changes for the change request 2007106--25th July 2007--
T_MESSAGE1_2 TYPE STANDARD TABLE OF TY_MESSAGE1_2,"ITfor conditions1_2 messages
*--End of changes for the change request 2007106--25th July 2007--
T_MESSAGE2 TYPE STANDARD TABLE OF TY_MESSAGE2, "IT for conditions2 messages
T_ACC2 TYPE STANDARD TABLE OF TY_ACC2, "IT for holding data for Second Access Sequence Processing
T_ACC1 TYPE STANDARD TABLE OF TY_ACC1, "IT for holding data for First Access Sequence Processing
T_SELECT TYPE STANDARD TABLE OF RSPARAMS, "IT for holding data related to the selection screen
*--Begin of changes for the change request 2007106--24th July 2007--
T_ACC1_2 TYPE STANDARD TABLE OF TY_ACC1_2, "IT for holding data for new intermediate Access Sequence
*--End of changes for the change request 2007106--24th July 2007--
*--Begin of changes for the change request 2007096--26th July 2007--
T_T006 TYPE STANDARD TABLE OF TY_T006, "IT for holding T006 Entries
*--End of changes for the change request 2007096--26th July 2007--
*--Begin of changes for the change request xxx--2nd Aug 2007--
T_MARM TYPE STANDARD TABLE OF TY_MARM, "IT for holding entries from MARM
*--End of changes for the change request xxx--2nd Aug 2007--
Work area Declarations
W_FIELDCATALOG TYPE SLIS_FIELDCAT_ALV, "Fieldcatalog WA
W_EVENT TYPE SLIS_ALV_EVENT, "Event WA
W_HEADER TYPE SLIS_LISTHEADER, "Header WA
W_LAYOUT TYPE SLIS_LAYOUT_ALV, "Layout WA
W_KEYINFO TYPE SLIS_KEYINFO_ALV, "Key Information WA
W_VB_AKAP TYPE TY_VB_AKAP, "To hold records from T_VB_AKAP
W_MARA TYPE TY_MARA, "To hold records from T_MARA
W_MVKE TYPE TY_MVKE, "To hold records from T_MVKE
W_VBKD TYPE TY_VBKD, "To hold records from T_VBKD
W_IHEADER TYPE TY_IHEADER, "To hold records from T_IHEADER
W_IFINAL TYPE TY_IFINAL, "To hold records from T_IFINAL
W_PARAMS TYPE CTU_PARAMS, "CTU Params
W_BDCDATA TYPE BDCDATA, "Work Area for BDCDATA
W_BDCMSGCOLL TYPE BDCMSGCOLL, "Work Area to collect BDC Messages
W_MESSAGE1 TYPE TY_MESSAGE1, "WA for price conditions1 messages
*--Begin of changes for the change request 2007106--25th July 2007--
W_MESSAGE1_2 TYPE TY_MESSAGE1_2, "WA for price conditions1_2 messages
*--End of changes for the change request 2007106--25th July 2007--
W_MESSAGE2 TYPE TY_MESSAGE2, "WA for price conditions2 messages
W_ACC2 TYPE TY_ACC2, "WA for holding records from T_ACC2
W_ACC1 TYPE TY_ACC1, "WA for holding records from T_ACC1
*--Begin of changes for the change request 2007106--24th July 2007--
W_ACC1_2 TYPE TY_ACC1_2, "WA for holding records from T_ACC1_2
*--End of changes for the change request 2007106--24th July 2007--
*--Begin of changes for the change request 2007096--26th July 2007--
W_T006 TYPE TY_T006, "WA for holding T_T006 Entries
*--End of changes for the change request 2007096--26th July 2007--
*--Begin of changes for the change request xxx--2nd Aug 2007--
W_MARM TYPE TY_MARM, "WA for holding entries of T_MARM
*--End of changes for the change request xxx--2nd Aug 2007--
Variable declarations
G_VKORG TYPE VKORG, "Sales Organization
G_VTWEG TYPE VTWEG, "Distribution Channel
G_AUDAT TYPE AUDAT, "Document Date (Date Received/Sent)
G_VBELN TYPE VBELN_VA, "Sales Document
G_KUNNR TYPE KUNAG, "Sold-to party
G_MATNR TYPE MATNR, "Material Number
G_REPID TYPE SY-REPID, "Program Name
G_MESSAGE(73) TYPE C, "To Capture Message
G_FLAG1(1) TYPE C, "Flag
G_ANSWER(1) TYPE C, "Optional Button
*--Begin of changes for the change request 2007096--26th July 2007--
G_NUM_SOURCE TYPE DZAEHL, "Holds Numerator value for Source Unit of Measure
G_NUM_TARGET TYPE DZAEHL, "Holds Numerator value for Target Unit of Measure
G_DEN_SOURCE TYPE NENNR, "Holds Denominator value for Source Unit of Measure
G_DEN_TARGET TYPE NENNR. "Holds Denominator value for Target Unit of Measure
*--End of changes for the change request 2007096--26th July 2007--
Constant declarations
CONSTANTS:
C_A(1) TYPE C VALUE 'A', "Constant Value A
C_S(1) TYPE C VALUE 'S', "Constant Value S
C_U(1) TYPE C VALUE 'U', "Constant Value U
C_X(1) TYPE C VALUE 'X', "Constant Value X
C_E(1) TYPE C VALUE 'E', "Constant Value E
C_I(1) TYPE C VALUE 'I', "Constant Value I
C_R(1) TYPE C VALUE 'R', "Constant Value R
C_B(1) TYPE C VALUE 'B', "Document Category is Quotation
C_HTNAME(10) TYPE C VALUE 'T_IHEADER', "Internal table for Header Data
C_ITNAME(10) TYPE C VALUE 'T_IFINAL', "Internal Table with processed data
C_Q2(2) TYPE C VALUE 'Q2', "Constant Order Reason Q2
C_100(3) TYPE C VALUE '100', "Popup screen
C_25(2) TYPE C VALUE '25', "Popup screen
C_5(1) TYPE C VALUE '5', "Popup screen
C_1 TYPE I VALUE 1, "Value 1 for Error Denotion
C_2 TYPE I VALUE 2, "Value 2 for Error Denotion
C_3 TYPE I VALUE 3, "Value 3 for BDC Error Denotion
C_1000(4) TYPE N VALUE 1000, "Value 1000
C_01(2) TYPE N VALUE '01', "Value 01 for Zcount
C_VK11(4) TYPE C VALUE 'VK11', "Transaction VK11
C_DYNBEGIN(1) TYPE C VALUE 'X', "Indicator
C_UPDATE(1) TYPE C VALUE 'S', "Update
C_DISMODE(1) TYPE C VALUE 'N', "Display
C_Q3(2) TYPE C VALUE 'Q3', "Quotation Approved
C_ZBPR(4) TYPE C VALUE 'ZBPR', "Condition Type ZBPR
*--Begin of changes for the change request xxx--2nd Aug 2007--
C_ZBPN(4) TYPE C VALUE 'ZBPN', "Condition Type ZBPN
*--End of changes for the change request xxx--2nd Aug 2007--
C_ERROR(5) TYPE C VALUE 'ERROR'. "Error screen title
S E L E C T O P T I O N S & P A R A M E T E R S *
Selection-screen Block 1
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_VKORG TYPE VKORG OBLIGATORY, "Sales Organization
P_VTWEG TYPE VTWEG OBLIGATORY, "Distribution Channel
P_SPART TYPE SPART DEFAULT '00'. "Division
SELECTION-SCREEN END OF BLOCK BLK1.
SELECTION-SCREEN BEGIN OF BLOCK BLK2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: S_AUDAT FOR G_AUDAT, "Document Date (Date Received/Sent)
S_VBELN FOR G_VBELN, "Sales Document
S_KUNNR FOR G_KUNNR, "Sold-to party
S_MATNR FOR G_MATNR. "Material Number
PARAMETERS: P_VKAUS(2) TYPE N. "Usage Indicator
SELECTION-SCREEN END OF BLOCK BLK2.
I N I T I A L I Z A T I O N *
INITIALIZATION.
CLEAR : G_REPID. "Program Name
G_REPID = SY-REPID. "Program Name
A T S E L E C T I O N S C R E E N *
CLEAR: G_VKORG,
G_VTWEG.
AT SELECTION-SCREEN ON P_VKORG.
SELECT SINGLE VKORG INTO G_VKORG
FROM TVKO
WHERE VKORG EQ P_VKORG.
IF SY-SUBRC NE 0.
MESSAGE E000(ZS) WITH TEXT-021.
ENDIF.
AT SELECTION-SCREEN ON P_VTWEG.
SELECT SINGLE VTWEG INTO G_VTWEG
FROM TVKOV
WHERE VKORG EQ P_VKORG
AND VTWEG EQ P_VTWEG.
IF SY-SUBRC NE 0.
MESSAGE E000(ZS) WITH TEXT-022.
ENDIF.
CLEAR: G_VKORG,
G_VTWEG.
S T A R T O F S E L E C T I O N *
START-OF-SELECTION.
Data Selection
PERFORM DATA_RETRIEVAL.
Build Field Catalog
PERFORM BUILD_FIELDCATALOG.
Bulid layout
PERFORM BUILD_LAYOUT.
Build Events
PERFORM BUILD_EVENTS.
Captures the Values of Selection Screen
PERFORM CAPTURE_SCREEN.
E N D O F S E L E C T I O N *
END-OF-SELECTION.
Display List
PERFORM DISPLAY_ALV_REPORT.
F O R M S *
*& Form DATA_RETRIEVAL
Retrieves Data for ALV Display
*--Begin of changes for the change request 2007106--25th July 2007--
*--End of changes for the change request 2007106--25th July 2007--
FORM DATA_RETRIEVAL .
DATA : L_VKAUS TYPE VKAUS. "Variable to hold Usage Indicator
CLEAR L_VKAUS.
SELECT VBELN
KUNNR
INTO CORRESPONDING FIELDS OF TABLE T_IHEADER
FROM VBAK
WHERE VBELN IN S_VBELN
AND KUNNR IN S_KUNNR
AND VKORG EQ P_VKORG
AND AUDAT IN S_AUDAT
AND VTWEG EQ P_VTWEG
AND SPART EQ P_SPART
AND AUGRU EQ C_Q2
AND VBTYP EQ C_B.
IF NOT T_IHEADER IS INITIAL.
IF NOT P_VKAUS IS INITIAL.
*--Begin of changes for the change request 2007106--25th July 2007--COMMENTED FROM HERE---
IF P_VKAUS EQ C_1. "IF Zcount is given as 1 then quotation without zcount should be picked
"for whom Material Pricing Group should be given.
SELECT A~VBELN
A~KUNNR
B~POSNR
B~MATNR
B~PMATN
B~KWMENG
B~VRKME
B~KZWI1
B~VKAUS
INTO TABLE T_VB_AKAP
FROM VBAK AS A
JOIN VBAP AS B
ON AVBELN EQ BVBELN
FOR ALL ENTRIES IN T_IHEADER
WHERE A~VBELN EQ T_IHEADER-VBELN
AND B~MATNR IN S_MATNR.
ELSE.
*--End of changes for the change request 2007106--25th July 2007--COMMENTED TILL HERE---
CONCATENATE 'C' P_VKAUS INTO L_VKAUS.
SELECT A~VBELN
A~KUNNR
B~POSNR
B~MATNR
B~PMATN
B~KWMENG
B~VRKME
B~KZWI1
B~VKAUS
*--Begin of changes for the change request 2007096--26th July 2007--
A~WAERK
*--End of changes for the change request 2007096--26th July 2007--
INTO TABLE T_VB_AKAP
FROM VBAK AS A
JOIN VBAP AS B
ON AVBELN EQ BVBELN
FOR ALL ENTRIES IN T_IHEADER
WHERE A~VBELN EQ T_IHEADER-VBELN
AND B~MATNR IN S_MATNR
AND B~VKAUS EQ L_VKAUS.
ENDIF.
ELSE.
SELECT A~VBELN
A~KUNNR
B~POSNR
B~MATNR
B~PMATN
B~KWMENG
B~VRKME
B~KZWI1
B~VKAUS
*--Begin of changes for the change request 2007096--26th July 2007--
A~WAERK
*--End of changes for the change request 2007096--26th July 2007--
INTO TABLE T_VB_AKAP
FROM VBAK AS A
JOIN VBAP AS B
ON AVBELN EQ BVBELN
FOR ALL ENTRIES IN T_IHEADER
WHERE A~VBELN EQ T_IHEADER-VBELN
AND B~MATNR IN S_MATNR.
ENDIF.
IF NOT T_VB_AKAP IS INITIAL.
SELECT VBELN
POSNR
BSTKD_E
INTO TABLE T_VBKD
FROM VBKD
FOR ALL ENTRIES IN T_VB_AKAP
WHERE VBELN EQ T_VB_AKAP-VBELN
AND POSNR EQ T_VB_AKAP-POSNR.
ENDIF.
SORT T_VBKD BY VBELN POSNR.
CLEAR W_VB_AKAP.
After much of coding was completed, Usage of PMATN was dropped and
the first eighteen characters of the field BSTKD was proposed for usage
Hence PMATN is overwritten by BSTKD value in the below loop
LOOP AT T_VB_AKAP INTO W_VB_AKAP.
CLEAR: W_VBKD,
W_VB_AKAP-PMATN.
READ TABLE T_VBKD INTO W_VBKD
WITH KEY VBELN = W_VB_AKAP-VBELN
POSNR = W_VB_AKAP-POSNR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
W_VB_AKAP-PMATN = W_VBKD-BSTKD_E+0(18).
ENDIF.
MODIFY T_VB_AKAP FROM W_VB_AKAP TRANSPORTING PMATN.
CLEAR W_VB_AKAP.
ENDLOOP.
IF NOT T_VB_AKAP IS INITIAL.
Collecting all Material Numbers along with their Technical Spec data for all the materials available in T_VB_AKAP.
SELECT MATNR
ZZTECHSPEC
INTO TABLE T_MARA
FROM MARA
FOR ALL ENTRIES IN T_VB_AKAP
WHERE MATNR EQ T_VB_AKAP-MATNR.
IF SY-SUBRC EQ 0.
SORT T_MARA BY MATNR.
ENDIF. "Checking SY-SUBRC for T_MARA
SELECT MATNR
ZZTECHSPEC
APPENDING TABLE T_MARA
FROM MARA
FOR ALL ENTRIES IN T_VB_AKAP
WHERE MATNR EQ T_VB_AKAP-PMATN.
IF SY-SUBRC EQ 0.
SORT T_MARA BY MATNR.
ENDIF. "Checking SY-SUBRC for T_MARA
*--Begin of changes for the change request xxx--2nd Aug 2007--
Collecting information into T_MARM for all the available materials so that it could be used for conversion into Alternate UOM
SELECT MATNR " Material Number
MEINH " Alternate UOM
UMREZ " Numerator for conversion
UMREN " Denominator for conversion
FROM MARM
INTO TABLE T_MARM
FOR ALL ENTRIES IN T_VB_AKAP
WHERE MATNR EQ T_VB_AKAP-MATNR.
IF SY-SUBRC = 0.
SORT T_MARM BY MATNR MEINH.
ENDIF. "Checking SY-SUBRC for T_MARM
SELECT MATNR " Material Number
MEINH " Alternate UOM
UMREZ " Numerator for conversion
UMREN " Denominator for conversion
FROM MARM
APPENDING TABLE T_MARM
FOR ALL ENTRIES IN T_VB_AKAP
WHERE MATNR EQ T_VB_AKAP-PMATN.
IF SY-SUBRC = 0.
SORT T_MARM BY MATNR MEINH.
ENDIF. "Checking SY-SUBRC for T_MARM
*--End of changes for the change request xxx--2nd Aug 2007--
SELECT MATNR
VKORG
VTWEG
KONDM
*--Begin of changes for the change request 2007096--26th July 2007--
VRKME
*--End of changes for the change request 2007096--26th July 2007--
INTO TABLE T_MVKE
FROM MVKE
FOR ALL ENTRIES IN T_VB_AKAP
WHERE MATNR EQ T_VB_AKAP-PMATN.
IF SY-SUBRC EQ 0.
SORT T_MVKE BY MATNR VKORG VTWEG.
ENDIF. "Checking SY-SUBRC for T_MVKE
SELECT MATNR
VKORG
VTWEG
KONDM
*--Begin of changes for the change request 2007096--26th July 2007--
VRKME
*--End of changes for the change request 2007096--26th July 2007--
APPENDING TABLE T_MVKE
FROM MVKE
FOR ALL ENTRIES IN T_VB_AKAP
WHERE MATNR EQ T_VB_AKAP-MATNR.
IF SY-SUBRC EQ 0.
SORT T_MVKE BY MATNR VKORG VTWEG.
ENDIF. "Checking SY-SUBRC for T_MVKE
*--Begin of changes for the change request 2007096--26th July 2007--
SELECT MSEHI
ZAEHL
NENNR
INTO TABLE T_T006
FROM T006
FOR ALL ENTRIES IN T_VB_AKAP
WHERE MSEHI EQ T_VB_AKAP-VRKME.
IF SY-SUBRC EQ 0.
SORT T_T006 BY MSEHI.
ENDIF. "Checking SY-SUBRC for T_T006
IF NOT T_MVKE IS INITIAL.
SELECT MSEHI
ZAEHL
NENNR
APPENDING TABLE T_T006
FROM T006
FOR ALL ENTRIES IN T_MVKE
WHERE MSEHI EQ T_MVKE-VRKME.
IF SY-SUBRC EQ 0.
SORT T_T006 BY MSEHI.
ENDIF. "Checking SY-SUBRC for T_T006
ENDIF. "Checking for Initial status of internal table T_MVKE
*--End of changes for the change request 2007096--26th July 2007--
ENDIF. " FOR T_VB_AKAP NOT INITIAL.
ENDIF. " FOR T_IHEADER NOT INITIAL.
CLEAR: W_VB_AKAP,
W_IFINAL.
LOOP AT T_VB_AKAP INTO W_VB_AKAP.
W_IFINAL-VBELN = W_VB_AKAP-VBELN.
W_IFINAL-KUNNR = W_VB_AKAP-KUNNR.
W_IFINAL-POSNR = W_VB_AKAP-POSNR.
W_IFINAL-MATNR = W_VB_AKAP-MATNR.
W_IFINAL-PMATN = W_VB_AKAP-PMATN.
W_IFINAL-KWMENG = W_VB_AKAP-KWMENG.
W_IFINAL-VRKME = W_VB_AKAP-VRKME.
W_IFINAL-KZWI1 = ( W_VB_AKAP-KZWI1 / W_VB_AKAP-KWMENG ) * 1000.
W_IFINAL-VKAUS = W_VB_AKAP-VKAUS.
*--Begin of changes for the change request 2007096--26th July 2007--
W_IFINAL-WAERK = W_VB_AKAP-WAERK.
*--End of changes for the change request 2007096--26th July 2007--
Populating Material Pricing Group from New Material Group, if such Group doesn't exist
Population of Material Pricing Group from Material Number is tried.
Similar condition does suit for Tech Spec too.
SORT: T_MVKE BY MATNR VKORG VTWEG,
T_MARA BY MATNR.
IF NOT W_VB_AKAP-PMATN IS INITIAL.
CLEAR W_MVKE.
READ TABLE T_MVKE
INTO W_MVKE
WITH KEY MATNR = W_VB_AKAP-PMATN
VKORG = P_VKORG
VTWEG = P_VTWEG
BINARY SEARCH.
IF SY-SUBRC EQ 0.
W_IFINAL-KONDM = W_MVKE-KONDM.
*--Begin of changes for the change request 2007096--26th July 2007--
IF ( W_IFINAL-VRKME NE W_MVKE-VRKME ) AND ( NOT W_MVKE-VRKME IS INITIAL ).
*--Begin of changes for the change request xxx--2nd Aug 2007--
CLEAR: W_MARM,
G_NUM_SOURCE,
G_DEN_SOURCE,
G_NUM_TARGET,
G_DEN_TARGET.
READ TABLE T_MARM INTO W_MARM
WITH KEY MATNR = W_IFINAL-PMATN
MEINH = W_IFINAL-VRKME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
G_NUM_SOURCE = W_MARM-UMREZ.
G_DEN_SOURCE = W_MARM-UMREN.
CLEAR W_MARM.
READ TABLE T_MARM INTO W_MARM
WITH KEY MATNR = W_IFINAL-PMATN
MEINH = W_MVKE-VRKME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
G_NUM_TARGET = W_MARM-UMREZ.
G_DEN_TARGET = W_MARM-UMREN.
CLEAR W_MARM.
W_IFINAL-KWMENG = W_IFINAL-KWMENG * ( G_NUM_SOURCE / G_DEN_SOURCE ) * ( G_DEN_TARGET / G_NUM_TARGET ).
CLEAR W_IFINAL-KZWI1.
W_IFINAL-KZWI1 = ( W_VB_AKAP-KZWI1 / W_IFINAL-KWMENG ) * 1000.
W_IFINAL-VRKME = W_MVKE-VRKME.
ENDIF. "Check SY-SUBRC for W_MARM using W_MVKE-VRKME (Sales UOM)
ELSE.
*--End of changes for the change request xxx--2nd Aug 2007--
CLEAR: W_T006,
G_NUM_SOURCE,
G_DEN_SOURCE,
G_NUM_TARGET,
G_DEN_TARGET.
READ TABLE T_T006 INTO W_T006 WITH KEY MSEHI = W_IFINAL-VRKME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
G_NUM_SOURCE = W_T006-ZAEHL. "Numerator to convert specified UOM to SI UOM
G_DEN_SOURCE = W_T006-NENNR. "Denominator to convert specified UOM to SI UOM
CLEAR W_T006.
READ TABLE T_T006 INTO W_T006 WITH KEY MSEHI = W_MVKE-VRKME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
G_NUM_TARGET = W_T006-ZAEHL. "Numerator to convert specified UOM to SI UOM
G_DEN_TARGET = W_T006-NENNR. "Denominator to convert specified UOM to SI UOM
CLEAR W_T006.
W_IFINAL-KWMENG = W_IFINAL-KWMENG * ( G_NUM_SOURCE / G_DEN_SOURCE ) * ( G_DEN_TARGET / G_NUM_TARGET ).
CLEAR W_IFINAL-KZWI1.
W_IFINAL-KZWI1 = ( W_VB_AKAP-KZWI1 / W_IFINAL-KWMENG ) * 1000.
W_IFINAL-VRKME = W_MVKE-VRKME.
ENDIF. "Check for SY-SUBRC for READ TABLE T_T006 using W_MVKE-VRKME (Sales UOM)
ENDIF. "Check for SY-SUBRC for READ TABLE T_T006 using W_IFINAL-VRKME (Quotation UOM)
ENDIF. "Check SY-SUBRC for W_MARM using W_IFINAL-VRKME (Quotation UOM)
ENDIF. "Check for ( W_IFINAL-VRKME NE W_MVKE-VRKME ) AND ( NOT W_MVKE-VRKME IS INITIAL )
*--End of changes for the change request 2007096--26th July 2007--
ENDIF.
READ TABLE T_MARA
INTO W_MARA
WITH KEY MATNR = W_VB_AKAP-PMATN
BINARY SEARCH.
IF SY-SUBRC EQ 0.
W_IFINAL-ZZTECHSPEC = W_MARA-ZZTECHSPEC.
ENDIF. -
Hi,
I have to create the credit memo based on user selected records. My program is doing it, but I am having two problems,
1)After creating the credit memo it is not clearing those records, if I choose next set it is adding 2nd time selected records to the first time selected records and adding to previous credit memo number.
2)If the credit memo number is already there to a record, it should not allow the same record to create another CM.
Please help me to solve these.
Thanks,
Neelu.
REPORT zsd_creditmemo NO STANDARD PAGE HEADING.
TABLES: zppprice, kna1.
TYPES: BEGIN OF ty_zprice,
mandt TYPE mandt,
vkorg TYPE vkorg,
vtweg TYPE vtweg,
spart TYPE spart,
kunnr TYPE kunnr,
matnr TYPE matnr,
crdate TYPE zcrdate,
efdate TYPE zefdate,
sprice TYPE zprice3,
eprice TYPE zprice4,
eohqty TYPE zquantity1,
aohqty TYPE zquantity2,
auart TYPE auart,
bstkd TYPE bstkd,
werks TYPE werks_d,
augru TYPE augru,
xblnr TYPE xblnr,
crmemo TYPE vbeln,
index TYPE sy-index,
END OF ty_zprice.
DATA: it_ztable TYPE TABLE OF zppprice WITH HEADER LINE,
gt_zprice TYPE TABLE OF zppprice WITH HEADER LINE,
gt1_zprice TYPE TABLE OF zppprice,
gt2_zprice TYPE TABLE OF ty_zprice,
gt3_zprice TYPE TABLE OF ty_zprice,
gt4_zprice TYPE TABLE OF ty_zprice,
gs_zprice TYPE zppprice,
gs_zprice1 TYPE ty_zprice,
ls_zprice TYPE ty_zprice,
wa LIKE zppprice.
DATA: salesdocument TYPE bapivbeln-vbeln.
DATA: header LIKE bapisdhd1.
DATA: headerx LIKE bapisdhd1x.
DATA: item LIKE bapisditm OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapiparnr OCCURS 0 WITH HEADER LINE.
DATA: return1 LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: conditions1 LIKE bapicond OCCURS 0 WITH HEADER LINE.
DATA: order_text LIKE bapisdtext OCCURS 0 WITH HEADER LINE.
DATA: lv_index TYPE sy-index,
v_tabix TYPE sytabix,
chbox(1) TYPE c VALUE ' ',
repid TYPE sy-repid,
lv_itemno TYPE i VALUE 10,
lv_pprice TYPE zprice3,
lv_lines TYPE i,
lv_flg TYPE c,
lv_cnt TYPE i.
repid = sy-repid.
PERFORM displaydata.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'CMEMO'.
DESCRIBE TABLE gt_zprice LINES lv_cnt.
* lv_index = 1.
DO lv_cnt TIMES.
lv_index = sy-index + 1.
READ LINE lv_index FIELD VALUE chbox.
IF chbox = 'X'.
READ TABLE gt_zprice INTO gs_zprice1 INDEX sy-index.
IF sy-subrc EQ 0.
gs_zprice1-index = sy-index.
APPEND gs_zprice1 TO gt2_zprice.
CLEAR gs_zprice1.
ENDIF.
* ELSE.
* WRITE: /01(253) 'Please Select At least One Record'.
ENDIF.
clear chbox.
ENDDO.
gt4_zprice[] = gt2_zprice[].
SORT gt2_zprice BY vkorg vtweg spart kunnr.
DELETE ADJACENT DUPLICATES FROM gt2_zprice
COMPARING vkorg vtweg spart kunnr.
DESCRIBE TABLE gt2_zprice LINES lv_lines.
IF lv_lines = 1.
LOOP AT gt4_zprice INTO gs_zprice1.
AT NEW kunnr.
MOVE 'Y' TO lv_flg.
ENDAT.
IF lv_flg EQ 'Y'.
PERFORM headerdata.
PERFORM texts.
CLEAR lv_flg.
ENDIF.
PERFORM itemdata.
APPEND gs_zprice1 TO gt3_zprice.
ENDLOOP.
PERFORM call_function.
PERFORM update_pricetable.
PERFORM errorcheckandcommit.
PERFORM displaydata.
* WRITE: /01(253) 'Please Select Again To Create Another Credit Memo'.
REFRESH gt2_zprice.
CLEAR chbox.
CLEAR lv_lines.
ELSE.
* WRITE: /01(253) 'Please Select Same Customer'.
REFRESH gt2_zprice.
CLEAR chbox.
EXIT.
ENDIF.
ENDCASE.
*& Form headerdata
* text
* --> p1 text
* <-- p2 text
FORM headerdata.
* header data
* Sales document type
header-doc_type = gs_zprice1-auart.
headerx-doc_type = 'X'.
* Sales organization
header-sales_org = gs_zprice1-vkorg.
headerx-sales_org = 'X'.
* Distribution channel
header-distr_chan = gs_zprice1-vtweg.
headerx-distr_chan = 'X'.
* Division
header-division = gs_zprice1-spart.
headerx-division = 'X'.
* Customer PO Number
header-purch_no_c = gs_zprice1-bstkd.
headerx-purch_no_c = 'X'.
* Order Reason
header-ord_reason = gs_zprice1-augru.
headerx-ord_reason = 'X'.
* Ref Doc Number
header-ref_doc_l = gs_zprice1-xblnr.
headerx-ref_doc_l = 'X'.
headerx-updateflag = 'I'.
ENDFORM. " headerdata
*& Form Texts
* text
* --> p1 text
* <-- p2 text
FORM texts.
*Texts
order_text-itm_number = '000000'.
order_text-text_id = '0001'.
order_text-langu = sy-langu.
order_text-text_line = gs_zprice1-xblnr.
APPEND order_text.
ENDFORM. " Texts
*& Form itemdata
* text
* --> p1 text
* <-- p2 text
FORM itemdata.
* Partner data
* Sold to
partner-partn_role = 'AG'.
partner-partn_numb = gs_zprice1-kunnr.
APPEND partner.
* ITEM DATA
itemx-updateflag = 'I'.
* Line item number.
item-itm_number = lv_itemno.
itemx-itm_number = 'X'.
* Material
item-material = gs_zprice1-matnr.
itemx-material = 'X'.
* Plant
item-plant = gs_zprice1-werks.
itemx-plant = 'X'.
* Quantity
item-target_qty = gs_zprice1-eohqty.
itemx-target_qty = 'X'.
APPEND item.
APPEND itemx.
*Fill schedule lines
lt_schedules_in-itm_number = lv_itemno.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = gs_zprice1-eohqty.
APPEND lt_schedules_in.
*Fill schedule line flags
lt_schedules_inx-itm_number = lv_itemno.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'I'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
*Conditions
lv_pprice = gs_zprice1-sprice - gs_zprice1-eprice.
conditions1-itm_number = lv_itemno.
conditions1-cond_type = 'ZCPP'.
conditions1-cond_value = lv_pprice.
conditions1-currency = 'USD'.
conditions1-cond_unit = 'EA'.
conditions1-cond_p_unt = 1.
APPEND conditions1.
lv_itemno = lv_itemno + 10.
ENDFORM. " itemdata
*& Form call_function
* text
* --> p1 text
* <-- p2 text
FORM call_function.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = salesdocument
TABLES
return = return1
sales_items_in = item
sales_items_inx = itemx
sales_partners = partner
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_conditions_in = conditions1
sales_text = order_text.
ENDFORM. " call_function
*& Form errorcheck
* text
* --> p1 text
* <-- p2 text
FORM errorcheckandcommit.
* Check the return table.
LOOP AT return1 WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
break singireddyn.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
*Commit the work.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
ENDFORM. " errorcheckandcommit
*& Form update_pricetable
* text
* --> p1 text
* <-- p2 text
FORM update_pricetable.
LOOP AT gt3_zprice INTO ls_zprice.
READ TABLE gt_zprice INTO gs_zprice INDEX ls_zprice-index.
IF sy-subrc EQ 0.
v_tabix = sy-tabix.
gs_zprice-crmemo = salesdocument.
MODIFY gt_zprice
FROM gs_zprice INDEX v_tabix TRANSPORTING crmemo.
ENDIF.
ENDLOOP.
* REFRESH:gt3_zprice.
LOOP AT gt_zprice.
wa-vkorg = gt_zprice-vkorg.
wa-vtweg = gt_zprice-vtweg.
wa-spart = gt_zprice-spart.
wa-kunnr = gt_zprice-kunnr.
wa-matnr = gt_zprice-matnr.
wa-crdate = gt_zprice-crdate.
wa-efdate = gt_zprice-efdate.
wa-sprice = gt_zprice-sprice.
wa-eprice = gt_zprice-eprice.
wa-eohqty = gt_zprice-eohqty.
wa-aohqty = gt_zprice-aohqty.
wa-auart = gt_zprice-auart.
wa-bstkd = gt_zprice-bstkd.
wa-werks = gt_zprice-werks.
wa-augru = gt_zprice-augru.
wa-xblnr = gt_zprice-xblnr.
wa-crmemo = gt_zprice-crmemo.
MODIFY zppprice FROM wa.
CLEAR: wa, zppprice.
ENDLOOP.
ENDFORM.
*& Form Displaydata
* text
* --> p1 text
* <-- p2 text
FORM displaydata.
SET PF-STATUS 'LIST'.
NEW-PAGE LINE-SIZE 253.
SELECT * FROM zppprice
INTO TABLE gt_zprice.
WRITE: /01(253) sy-uline.
LOOP AT gt_zprice INTO gs_zprice.
SELECT SINGLE name1 FROM kna1 INTO kna1-name1
WHERE kunnr = gs_zprice-kunnr.
WRITE: /01 sy-vline,
02 chbox AS CHECKBOX,
04 sy-vline,
05 gs_zprice-vkorg,
10 sy-vline,
11 gs_zprice-vtweg,
14 sy-vline,
15 gs_zprice-spart,
18 sy-vline,
19 gs_zprice-kunnr,
30 sy-vline,
31 kna1-name1,
67 sy-vline,
68 gs_zprice-matnr,
87 sy-vline,
88 gs_zprice-crdate,
98 sy-vline,
99 gs_zprice-efdate,
110 sy-vline,
111 gs_zprice-sprice,
127 sy-vline,
128 gs_zprice-eprice,
145 sy-vline,
146 gs_zprice-eohqty,
157 sy-vline,
158 gs_zprice-aohqty,
169 sy-vline,
170 gs_zprice-auart,
175 sy-vline,
176 gs_zprice-bstkd,
212 sy-vline,
213 gs_zprice-werks,
218 sy-vline,
219 gs_zprice-augru,
223 sy-vline,
224 gs_zprice-xblnr,
241 sy-vline,
242 gs_zprice-crmemo,
253 sy-vline.
* CLEAR zppprice.
ENDLOOP.
WRITE: /01(253) sy-uline.
* CLEAR zppprice.
* CLEAR chbox.
ENDFORM. " DisplaydataHello Neelu,
once user select check box and it will create credit memo,so selected records it contains one value would be 'X'.,
After BAPI FM use delete command where field = 'X'. so it will delete those records. so now you have remaining records.
do not use exit or someother command,here you are just deleting the internal table data and so no worries.
<b>it any of the selected records have CM number can I come out of the loop and exit.</b>
look at real time requirement ,some time user will select one check box and create credit memo ,again he will select other check boxes too. so use simple delete command.
Thanks
Seshu -
Urgent Help Required for Check Box in Table Column
Hi all,
Could any body help me to solve my problem?
First of all I have created a table whose one column is check box. The column of the tables are Name,Phone,ID,Address and a checkBox columns.In one view
the table will be found with data. I want to click on some of the rows(suppose there are 5 rows, but based on some condition I have selected the check box of 3 rows).
Next there will be a button(Supose SEND Button).
After selecting the check box I want to press that button and then a new window will come which will show two tables. one for selected rows(with the same columns name except check box) and another for Unchecked rows with the same column name(Name,Phone,ID,Address).
Could any body help me by sending the details and code?
Thanks and Regards.
SudipHi Sudip,
1) create custom controller and appropriate context structure there (dataNode(Name,Phone,ID,Address,Check))
2) create view StartView. Map data node from custom controller to node in view. Create table and bind context node attributes to appropriate table columns.
3) create view ResultView. Map data node from custom controller to node in view. Create 2 nodes (CheckedData, UncheckedData) with supply methods. Create filtering implementation in supply methods (add checked and unchecked node elements to appropriate nodes).
4) create new window with resultView as default view
4) in startView in button action handler put something like
IWDWindowInfo _windowInfo = wdComponentAPI.getComponentInfo().findInWindows("Popup");
IWDWindowManager manager = wdComponentAPI.getWindowManager();
IWDWindow _window = manager.createWindow(_windowInfo, true);
_window.open();
So, just tried localy and it works.
Best regards, Maksim Rashchynski. -
Passing check box values to WHERE clause
Hi,
I have created a Data block - 'CONTACTS' (Database data block)
and has database item - 'Code', 'Descr'
The number of records displayed is set to 5.
Value When checked - 'Y'
Value When Unchecked - 'N'
Check box mapping of other values - 'unchecked'
I am writing the code inside 'WHEN BUTTON PRESSED'. My main objective is to return the count of records based
based on several conditions and one among them is CODE which is can be single or multiple based on the check box checked.
The requirement is when i check one or multiple checkboxes, i should pass the 'Code' item values to the WHERE clause.
Right now whenver i am trying to do so, only the current record value is copied to the WHERE clause.
I have tried using basic loop but things havnt worked.
Logic tried with basic LOOP
BEGIN
GO_BLOCK('CONTACT');
IF :contact.cb = 'Y' THEN
LOOP
IF p_where is null then
p_where := :contact.code;
else
p_where := p_where ||','||:contact.code;
end if;
exit when :system.last_record = 'TRUE';
next_record;
END LOOP;
end if;
MESSAGE ( 'p_where :'||p_where);
MESSAGE (' ');
END;
And Even if i write the LOOP before the first IF, it return me the current record value and move to the last record.
please guide me where am i wrong.
Regards.
Anoop.Try something like this:
FIRST_RECORD;
LOOP
IF :contact.cb = 'Y' THEN
IF p_where is null then
p_where := :contact.code;
else
p_where := p_where ||','||:contact.code;
end if;
END IF;
exit when :system.last_record = 'TRUE';
next_record;
END LOOP;
-- END LOOP;
MESSAGE ( 'p_where :'||p_where);
MESSAGE (' ');
END; -
How to disable check box (row selector) in a tabular APEX report
I have a tabular report with check boxes that gets populated by a SQL query. For certain rows, I want to disable (or not render) the check box, depending on the value of one of the columns for that particular row (if the value of a column defined as Date is less than sysdate, I don't want to display the check box for that row). I tried using the Conditional Display in the Column Attribute section of the check box, but I am unable to access this Date column which is being selected from a view in the source SQL. I used variable such as :name-of_column, V(':name-of_column'), but always get a NULL value for this Date column in the SQL that I am trying to code in the Conditional Display section. For this reason, my condition does not work correctly.
What am I doing wrong? Is my approach above correct?Hi Ajay,
I don't think you can handle this with a conditional display, as that works on column level rather than row level.
The way I see it, there are two things you can do:
1) an sql approach, where youo render the checkbox as part of your query using apex_item.checkbox, check the oracle docs for detailed info on the usage APEX_ITEM
You'll end up with a query like
select case when YOUR_DATE_COLUMN < sysdate
then null
else apex_item.checkbox2( p_idx => 1
, p_value => YOUR_DATE_COLUMN
, <rest of your query here>
from YOUR_TABLE
2) an JavaScript approach in which you create a dynamic action that check your tabular form date column and, when necessary hides and disables the checkbox for that row.
First option is more robust, but will require a bit more work. Second option is faster to develop, but might have different effect across various browsers and browser versions.
Regads,
Vincent
http://vincentdeelen.blogspot.com -
How can multiple check boxes be added at one time to a form?
How can multiple check boxes be added at one time to a form?
Thanks for your response, but copying and pasting creates a link. If the user places a check mark in one of the boxes, all the rest of the boxes will have a check mark also. I will research this some more.
Carol Deatherage
Receptionist
Novar/Honeywell
1000 SE 14th Street
Bentonville, AR 72712
Office: (800) 341-7795
Fax: (479) 271-0657
[email protected]<mailto:[email protected]>
Your feedback is important to us! Please take a moment to rate this response.
Click Here to Access the Survey<https://www.surveymonkey.com/s/NovarSurvey>!
This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately.
Novar Confidential *** -
How do I add an outline to a check box in InDesign CS6?
We have a series of existing documents (that were not produced by us) where the check boxes show up as purple boxes in the exported interactive pdfs. Our client wants us to amend the check boxes so that they show up in the pdf as purple boxes with a .25pt black outline, (which would also show up if the pdf was printed).
In the InDesign document the check boxes already have a 1pt black outline (which doesn't show in the pdf). I can change the 1pt outline to ,25pt, but it still doesn't show in the pdf.
We have other documents with check boxes where the outline does show up in the exported pdf, but we can't see any difference at all in the properties of the check boxes, so we can't see why some outlines work and others don't.
Any help would be gratefully received!insigniagraphics,
Here are the step-by-step instructions.
I assume you already have checkboxes on your ID document. If you don't, skip to the end of this post.
Select one and then switch to the Direct Selection (white arrow) tool.
Double click the edge of the check. You will see a blue frame around the check.
Select that blue frame with the Direct Selection tool. You have just selected the frame.
Go to the Stroke controls and make it Black.
You now have an outline around the check. This is what it will look like when it is chosen.
But your boss probably wants the outline also to be around the area of the check when it is not chosen.
Keep the form selected and switch to the Normal (off) state.
Use the Selection tool to select the frame edge again and apply the stroke.
You now have outlines around each check and in the empty spaces.
BTW the purple is deceptive and depends on Acrobat's settings.
End of the post:
Just start with a frame that has a stroke and you will have one when you convert it to a form. -
How do we check the check box items based on the databse fields.
Hi All,
I have a requirement like as mentioned below#
1. I have a combox box whcih i will be populated from database.
2. I have created two check box as "Stategric " and "Non Stategric".
3. Now when i select the combox box condition i need to select the check box items.
4. But the problem is i wil be knowing weather it is a stategric or Non stategirc based on the database column.
5. How do i need to map the database point of view and correlacte with javascript pont of view.
6. Do we need to write any Application process to achieve this task and who we can do that.
Thanks,
Anoo..Hi VC,
As per my understanding the code should be placed between --.
Based on this i have placed the code
function setCheckbox(pThis, pItem){
alert('inside');
var l_code = '';
// Get checkbox name
rName = document.getElementsById('P1_ENG_BAU').firstChild.name;
alert("The value is"+rName);
// Fire AJAX
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=CHECKBOX_LIST',0);
get.add('F120_COMPANY',pThis.value);
gReturn = get.get('XML');
if (gReturn) {
var values = gReturn.getElementsByTagName('value');
var messages = gReturn.getElementsByTagName('message');
// Build the checkbox
for (i=0; i<values.length; i++) {
var rValue = values.firstChild.nodeValue;
var rMessage = messages[i].firstChild.nodeValue;
l_code+='<input id='+P1_ENG_BAU+'_'+i+' type=checkbox value='+rValue+' name='+rName+'>';
l_code+='<label for='+P1_ENG_BAU+'_'+i+'>'+rMessage+'</label>
document.getElementsById('P1_ENG_BAU').innerHTML = l_code;
Correct me if iam understanding is wrong.
Thanks,
Anoo..
Edited by: Anoo on May 31, 2012 11:04 AM
Maybe you are looking for
-
Drivers for Windows 7 64-bit for HP Pavilion 15-p125ng
Can any one help me with Drivers for Windows 7 64-bit for HP Pavilion 15-p125ng? I'll be very grateful for any answers This question was solved. View Solution.
-
Automatic file naming and data saving
Hi, I am building a program where there will be several I-V scan for each value of temperature. I would like to make the data saving fully automatic. To explain in more deatils: I want the program to generate a new file on its own , give a file name
-
How do i show a popup in an OA Pageon the basis of some database validation
Hi All I need to show a popup message on the click of a button. On the click of the button I have to submit the page and do some database validation with the data entered by the user on that page. Depending on the validation I have to give a popup wh
-
IPlanet web server auto restart when user login or logout the NT server
Configuration - NT Server 4.0 SP6a - iPlanet Web Server 6.0 SP4 - JDK 1.3.1_03 - NT audit turned on for the file <iPlanet WS 60 instance home>/config/password.conf We encounter a problem that when a user login / logout NT machine, the iplanet web ser
-
Hi guys column(below in the SQL) is a Varchar string column. COLUMN has values like ('312049D','312CF45','EDC0645','EDC5679'). Why does SQL2 take more than twice times it takes to return SQL1 . I am learning ways to tune SQL. Please provide your sugg