2005 Dec 16 6:28 PM
Hi,
In Va01, if i enter sold-to party value & press enter, popup window should display valid active contracts for that sold-to-party.pOPUP WINDOW SHOULD HAVE FIELDS vbeln, auart,kTEXT,GUEBG,GUEEN from vbak. How can i achieve this?
Guru's help me ..........
Hi,
In Va01, if i enter sold-to party value & press enter, popup window should display valid active contracts for that sold-to-party.pOPUP WINDOW SHOULD HAVE FIELDS vbeln, auart,kTEXT,GUEBG,GUEEN from vbak. How can i achieve this?
Guru's help me ..........
2005 Dec 16 6:30 PM
you can code in PAI - check the value for the field sold-to-party and call a pop up window function module. Hope this will help you.
2005 Dec 16 6:31 PM
2005 Dec 16 6:39 PM
In that PopUp screen I need to give 2 options for "COPY" & CLOSE. If choose value & click Copy the corresponding Contract field filled with contract number......?????
Can you pl.. Give me same code for this FM?
2005 Dec 16 6:42 PM
Hi
You can use one of these fm:
POPUP_GET_VALUES:
Dialog box for the display and request of values, without check
POPUP_GET_VALUES_DB_CHECKED:
Dialog box for requesting values, check against the DB table/view
POPUP_GET_VALUES_SET_MAX_FIELD:
Dialog box for setting the maximum no. of fields per dialog box
POPUP_GET_VALUES_USER_BUTTONS:
Dialog box for requesting values and offering user pushbuttons
POPUP_GET_VALUES_USER_CHECKED:
Dialog box for requesting values, check by user exit
POPUP_GET_VALUES_USER_HELP:
Dialog box for requesting values, call of user exits and help
reward points if its helpful
2005 Dec 16 6:46 PM
fill the internal table with the data, and call the function module...
But is it standard transaction or custom..
regards
vijay
2005 Dec 16 6:50 PM
2005 Dec 16 7:07 PM
then in that case you can use
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
I_TITLE = 'Select Sales Order'
I_SCREEN_START_COLUMN = 30
I_SCREEN_START_LINE = 01
I_SCREEN_END_COLUMN = 100
I_SCREEN_END_LINE = 25
I_CHECKBOX_FIELDNAME = 'CHECK'
I_TABNAME = 'IT_VBAP'
IT_FIELDCAT = IT_FIELDCAT
IMPORTING
ES_SELFIELD = WA_SELFIELD
TABLES
T_OUTTAB = IT_VBAP
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
EXIT.
ENDIF.
2005 Dec 16 7:11 PM
populate the field catlaog,and populate the internal table with data . and call this FM ..
when you select the row this will return the slected row.
using that row you can populate the fields in the screen..
is it making sense?
let me know...
regards
vijay
2005 Dec 16 7:48 PM
Hi,
Title should be like this Open contract for Customer "XXXXX" XXXXX=Customer number should populate from screen field Sold-to-party.How can i do this???
2005 Dec 16 7:59 PM
Selecct the data from popup and read the table that return by the FM and populate with the data you got..
regards
vijay
2005 Dec 16 8:04 PM
Hi,
I want to check this FM with Report program by hardcoding Value. Do I need to Declare Fieldcatelog, Slis object??
you guys helping me lot can u give me Sample code to call this FM in Report program...........
2005 Dec 16 8:10 PM
REFRESH: IT_VBAK,
IT_VBAP.
IF R_SO = 'X'.
SELECT VBELN
KUNNR
BSTNK
INTO TABLE IT_VBAK
FROM VBAK
WHERE VBELN = I_VBELN AND
AUART IN S_AUART.
ELSEIF R_PO = 'X'.
SELECT VBELN
KUNNR
BSTNK
INTO TABLE IT_VBAK
FROM VBAK
WHERE BSTNK = I_BSTNK AND
AUART IN S_AUART.
ENDIF.
IF SY-SUBRC <> 0.
MESSAGE I002 WITH
'Enter valid sales order and purchase order number'(003).
EXIT.
ELSE.
IF NOT IT_VBAK[] IS INITIAL.
SELECT VBELN "Sales Document
POSNR "Sales Document Item
MATNR "Material Number
ARKTX "Customer Material
NETPR "Unit sell
KMEIN "Unit of measure
NETWR "Extended sell
POSEX "Order line number
KWMENG
INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
FROM VBAP
FOR ALL ENTRIES IN IT_VBAK
WHERE VBELN = IT_VBAK-VBELN
AND UEPOS = '000000'
AND ABGRU = ' '.
IF SY-SUBRC <> 0.
MESSAGE E002 WITH 'Sales Document item no found'(002).
EXIT.
ELSE.
ENDIF.
SELECT VBELN KUNNR PARVW ADRNR
INTO TABLE IT_VBPA
FROM VBPA
FOR ALL ENTRIES IN IT_VBAK
WHERE VBELN = IT_VBAK-VBELN. "AND
IF NOT IT_VBPA[] IS INITIAL.
SELECT KUNNR NAME1 NAME2 STRAS ORT01 REGIO PSTLZ
INTO TABLE IT_KNA1 FROM KNA1
FOR ALL ENTRIES IN IT_VBPA
WHERE KUNNR = IT_VBPA-KUNNR.
SELECT ADDRNUMBER NAME1 NAME2 POST_CODE1
STREET LOCATION REGION CITY1 COUNTRY
INTO TABLE IT_ADRC FROM ADRC
FOR ALL ENTRIES IN IT_VBPA
WHERE ADDRNUMBER = IT_VBPA-ADRNR.
ENDIF.
*-Get BSTKD from VBKD
SELECT BSTKD UP TO 1 ROWS
INTO V_BSTKD
FROM VBKD
WHERE VBELN = X_VBAK-VBELN.
ENDSELECT.
****** Fill fieldcat
DATA:IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA:WA_FIELDCAT LIKE LINE OF IT_FIELDCAT,
WA_SELFIELD TYPE SLIS_SELFIELD.
DATA:L_LINES LIKE SY-TABIX.
*-----change by itigin04
*----added sort condition.
SORT IT_VBAP BY VBELN POSEX.
WA_FIELDCAT-FIELDNAME = 'VBELN'.
WA_FIELDCAT-SELTEXT_M = 'Sales Document'(008).
WA_FIELDCAT-OUTPUTLEN = 14.
WA_FIELDCAT-COL_POS = 1.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'POSNR'.
WA_FIELDCAT-SELTEXT_M = 'Sales Document Item'(009).
WA_FIELDCAT-OUTPUTLEN = 19.
WA_FIELDCAT-COL_POS = 2.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'POSEX'.
WA_FIELDCAT-SELTEXT_M = 'Cust PO Line'(010).
WA_FIELDCAT-OUTPUTLEN = 12.
WA_FIELDCAT-COL_POS = 3.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-SELTEXT_M = 'Material Number'(011).
WA_FIELDCAT-OUTPUTLEN = 18.
WA_FIELDCAT-COL_POS = 4.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
I_TITLE = 'Select Sales Order to create IDoc'(012)
I_SCREEN_START_COLUMN = 30
I_SCREEN_START_LINE = 01
I_SCREEN_END_COLUMN = 100
I_SCREEN_END_LINE = 25
I_CHECKBOX_FIELDNAME = 'CHECK'
I_TABNAME = 'IT_VBAP'
IT_FIELDCAT = IT_FIELDCAT
IMPORTING
ES_SELFIELD = WA_SELFIELD
TABLES
T_OUTTAB = IT_VBAP
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
EXIT.
ENDIF.
E_VBAP[] = IT_VBAP[].
DESCRIBE TABLE IT_VBAP LINES L_LINES.
ENDIF.
ENDIF.
2005 Dec 16 10:02 PM
Hi,
Thanks a lot for ur help. Can i use Popup_get_value FM to diaply Value like this...
VBELN KTEXT AUART GUEBG GUEEN
value value value value value
val2 val2 val2 val2 val2
Copy cancel In this Format . Also I should able to select value in popup then corresponding value should go for screen field....... Help me with this
Again thanks a lot for ur great help all
2005 Dec 16 6:44 PM
Hi,
Probably this can be achieved by User Exits or Business ADDins.
Check the below link for Business Addins
http://help.sap.com/saphelp_47x200/helpdata/en/ee/a1d548892b11d295d60000e82de14a/content.htm
Check the below link for User Exits
http://help.sap.com/saphelp_47x200/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
Regards,
Vara
2005 Dec 16 7:54 PM
The place where you write the F4 code , you already have the customer number,
So you can concatenate 'Open Contracts for ' V_SOLDTO into a variable say v_title, and pass this field against the title parameter in the F4 FM.
- Kalpana
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |