2006 Jul 18 11:13 AM
Hi All,
I want to Create Inspection Plans using QP01 transaction using BDC.
It having 4 screens. Third and Fourth screens having line item details.
I did recording. Upto First and second screens data is populating properly, coming to third screen data is not taking even though bdctable having data (in debug mode i found). I don't know hw to resolve this problem.
Can u please explain hw to populate line-item details, possible give some example coding .
Regards,
Prabhakar
Hi All,
I want to Create Inspection Plans using QP01 transaction using BDC.
It having 4 screens. Third and Fourth screens having line item details.
I did recording. Upto First and second screens data is populating properly, coming to third screen data is not taking even though bdctable having data (in debug mode i found). I don't know hw to resolve this problem.
Can u please explain hw to populate line-item details, possible give some example coding .
Regards,
Prabhakar
2006 Jul 18 11:16 AM
Hi,
Use the BAPI BAPI_INSPECTIONPLAN_CREATE to create the Inspection plan as the recording may some times create problems if the screen sequence is not the same in QA/PRD system,
Rgds,
2006 Jul 18 11:31 AM
Hi Nagasamudram,
I don't know hw to use BAPI, bcz i am new to BAPI. Hw i will use this. Can you please explain in detail.
Doubt: If once we use BAPI, recording is necessary or not?
Urgent Please
Regards,
Prabhakar
2006 Jul 18 11:40 AM
Hi,
If you are comfortable using function modules then you will not have any difficulty in using the BAPI, only thing we need to take care of the following, refer the following this is not using the bapi for Inspection plan, this is done for different purpose, still you can refer this and use accordingly,
Data declarations,
DATA: TOPNODEONLY LIKE BAPICO_GROUP-TOPNODEONLY,
RETURN LIKE BAPIRET2,
LT_HIERARCHYNODES LIKE BAPISET_HIER OCCURS 0,
LT_HIERARCHYVALUES LIKE BAPI1117_VALUES OCCURS 0,
LS_HIERARCHYNODES LIKE BAPISET_HIER,
LS_HIERARCHYVALUES LIKE BAPI1117_VALUES,
LV_FLAG TYPE I,FLAG.
DATA: BEGIN OF ORDERS OCCURS 0,
ORDER_GROUP TYPE GRPDYNP-NAME_COALL,
DESC(30),
ORDER TYPE GRPVALUES-VFROM,
END OF ORDERS.
START-OF-SELECTION.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = FILENAME
FILETYPE = 'DAT'
TABLES
DATA_TAB = ORDERS.
SORT ORDERS BY ORDER_GROUP ORDER.
LOOP AT ORDERS.
IF LV_FLAG NE 1.
TRANSLATE ORDERS-ORDER_GROUP TO UPPER CASE.
LS_HIERARCHYNODES-GROUPNAME = ORDERS-ORDER_GROUP.
LS_HIERARCHYNODES-DESCRIPT = ORDERS-DESC.
LS_HIERARCHYNODES-HIERLEVEL = 0.
LS_HIERARCHYNODES-VALCOUNT = 0.
APPEND LS_HIERARCHYNODES TO LT_HIERARCHYNODES.
LV_FLAG = 1.
ENDIF.
CLEAR LS_HIERARCHYNODES.
LS_HIERARCHYNODES-GROUPNAME = ORDERS-ORDER.
LS_HIERARCHYNODES-HIERLEVEL = 1.
LS_HIERARCHYNODES-VALCOUNT = 0.
APPEND LS_HIERARCHYNODES TO LT_HIERARCHYNODES.
AT END OF ORDER_GROUP.
FLAG = 'X'.
ENDAT.
IF FLAG = 'X'.
BAPI is called to create Internal Order group in the system
CALL FUNCTION 'BAPI_INTERNALORDRGRP_CREATE'
TABLES
HIERARCHYNODES = LT_HIERARCHYNODES
HIERARCHYVALUES = LT_HIERARCHYVALUES.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
CLEAR : LT_HIERARCHYNODES[], LS_HIERARCHYNODES.
CLEAR : LV_FLAG,FLAG.
ENDIF.
ENDLOOP.
Hope this helps,
Rgds,
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |