Hi,
Greetings!
I want to clear the HEADER TEXT to be cleared while PO is getting copied.
So In BADI ME_PROCESS_PO_CUST method PROCESS_HEADER where to clear the Existing header text for the newly created PO.
help me out from this issue...
Hi,
Greetings!
I want to clear the HEADER TEXT to be cleared while PO is getting copied.
So In BADI ME_PROCESS_PO_CUST method PROCESS_HEADER where to clear the Existing header text for the newly created PO.
help me out from this issue...
Hi All,
I need to download all the variants of RFC and then upload it again to same RFC. The upload is required after system refresh.
How can I achieve this.
Regards,
Bharti Jain
Through custom program ,how can i update TMG...
I am executing one program in se38 , output will be 5 records, those 5 records again i am saving into new table
when new record going to be saved in TMG . Date and Time Should be auto filled..
an di dont want to hard code time and date in se 38 program.. it should be auto filled, when new record going to be saved in TMG through program.
I am getting errors while trying to perform an asset massive posting with posting keys “70” (debit asset) and “75” (credit asset). I was trying to test the BAPI BAPI_ACC_DOCUMENT_POST by creating a test program and just passing the values to the respective Internal tables. Kindly check the code and also the errors I am getting and suggest.
DATA: w_header TYPE bapiache09 ,
i_gl TYPE STANDARD TABLE OF bapiacgl09,
i_currency TYPE STANDARD TABLE OF bapiaccr09 ,
i_return TYPE STANDARD TABLE OF bapiret2,
v_objtype TYPE awtyp,
v_objkey TYPE awkey,
v_objsys TYPE awsys,
w_currency TYPE bapiaccr09,
w_gl TYPE bapiacgl09 .
w_header-username = sy-uname.
*w_header-obj_type = 'BKPFF'.
*w_header-obj_key = '$'.
*w_header-obj_sys = 'CEDCLNT120'.
*w_header-bus_act = 'RFBU'.
w_header-doc_date = '20151106'.
w_header-comp_code = 'CTBT'.
w_header-pstng_date = '20151106'.
w_header-header_txt = 'ABCD'.
w_currency-currency = 'USD'.
w_currency-itemno_acc = '0000000010'.
w_currency-amt_doccur = 100.
APPEND w_currency TO i_currency.
w_currency-currency = 'USD'.
w_currency-itemno_acc = '0000000020'.
w_currency-amt_doccur = -100.
APPEND w_currency TO i_currency.
w_gl-gl_account = '0000738000'.
*w_gl-bus_area = 'RFBU'.
w_gl-sub_number = '0000'.
w_gl-itemno_acc = '0000000010'.
w_gl-item_text = 'WERTT'.
w_gl-acct_type = 'A'.
w_gl-doc_type = 'AA'.
w_gl-comp_code = 'CTBT'.
w_gl-ALLOC_NMBR = '1234567891'.
w_gl-funds_ctr = '1A12B'.
w_gl-cmmt_item = 'TCIOTHER'.
w_gl-fund = 'CIFS'.
w_gl-asset_no = '140000000012'.
w_gl-sub_number = '0000'.
w_gl-FUNC_AREA_LONG = '1001_2015'.
w_gl-CS_TRANS_T = '120'.
APPEND w_gl TO i_gl.
w_gl-gl_account = '0000738000'.
*w_gl-bus_area = 'RFBU'.
w_gl-sub_number = '0000'.
w_gl-itemno_acc = '0000000020'.
w_gl-item_text = 'WERT'.
w_gl-acct_type = 'A'.
w_gl-doc_type = 'AA'.
w_gl-comp_code = 'CTBT'.
w_gl-ALLOC_NMBR = '1234567891'.
w_gl-funds_ctr = '1A12B'.
w_gl-cmmt_item = 'TCIOTHER'.
w_gl-fund = 'CIFS'.
w_gl-asset_no = '140000000012'.
w_gl-sub_number = '0000'.
w_gl-FUNC_AREA_LONG = '1001_2015'.
w_gl-CS_TRANS_T = '120'.
APPEND w_gl TO i_gl.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
DOCUMENTHEADER = w_header
IMPORTING
obj_type = v_objtype
obj_key = v_objkey
obj_sys = v_objsys
TABLES
ACCOUNTGL = i_gl
* ACCOUNTRECEIVABLE =
* ACCOUNTPAYABLE =
* ACCOUNTTAX =
CURRENCYAMOUNT = i_currency
return = i_return.
Errors screenshot is attached.
Dear all,
My senior developer has included some code in the Include MV50AFZ1. Now its my role to do with further changes.
Here am not able to analyse how data is getting filled into the standard internal table XLIPS. Can anyone pls help me out to know where data is getting filled into XLIPS..
Thanks in advance...
Hello,
I'm a student of Information Systems at CMU in Michigan. I'm enrolled in an ABAP programming class right now and my final project is to create a program in SAP using ABAP. It can be low, medium, or high complexity. I'm looking to do a high complexity project that incorporates a few screens and use data that is pulled from existing tables in SAP. I was hoping someone on here might have some ideas or example projects I could take a look at. Just so you know, the system I'm working with doesn't have HR data. Anyone's help would be great!
Thanks,
Craig
Hi,
I am looking for a bapi to update staging area for delivery items. The requirement is to update LIPS-LGBZO through a custom program.
I have tried using WS_DELIVERY_UPDATE_2 and SD_DELIVERY_UPDATE_PICKING, but could not get it to work. Please suggest.
Thanks in advance!
Regards,
Sri.
After entering the project (see screenshot in attachment) the selection variant which is maintained in spro define launchpads for navigation is not chosen automatically:
I know it is a BDC program but how to program so that the selection variant is chosen automatically,
BDC program for reference -:
FORM bdc_transaction USING tcode.
DATA : lv_transaction_code TYPE sy-tcode,
lv_opt TYPE ctu_params..
REFRESH messtab.
lv_opt-dismode = 'E'.
lv_opt-updmode = 'L'.
lv_opt-nobinpt = 'X'.
lv_transaction_code = tcode.
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = lv_transaction_code
EXCEPTIONS
ok = 0
not_ok = 1
OTHERS = 2.
IF sy-subrc = 0.
CALL TRANSACTION tcode USING bdcdata
* MODE 'A' "E'
* UPDATE 'L'
OPTIONS FROM lv_opt
MESSAGES INTO messtab.
ELSE.
MESSAGE i182(/cpd/cl_msg).
ENDIF.
LEAVE TO SCREEN 0.
ENDFORM. "BDC_TRANSACTION
*----------------------------------------------------------------------*
* Start new screen *
*----------------------------------------------------------------------*
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
*----------------------------------------------------------------------*
* Insert field *
*----------------------------------------------------------------------*
FORM bdc_field USING fnam fval.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDFORM. "bdc_field
Hi there,
I have some problem when I've created oo alv with cl_gui_alv_grid. I'm planning to use multiple selection, like when we activate a program and we can selected multiple program. So I've created in my layout:
gs_layout-zebra = 'X'.
gs_layout-cwidth_opt = 'X'.
gs_layout-edit = 'X'.
gs_layout-sel_mode = 'A'.
gs_layout-box_fname = 'SEL'.
then calling the grid
CALL METHOD t_grid->set_table_for_first_display
EXPORTING
i_save = 'A'
i_default = 'X'
is_layout = gs_layout
CHANGING
it_fieldcatalog = ls_fieldcat
it_outtab = it_data.
It was working fine, but I have to use CTRL and the value of sel didn't automatically updated. I've tried to use check box and It worked perfectly accept the view is inelegant . I tried to raise an event using this
CALL METHOD t_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified
EXCEPTIONS
error = 1
OTHERS = 2.
but nothing happens . What do I miss here?
Hi All,
i am posting this question after searching the scn blog.
i am using BDC for ME31K t-code. and in the last screen has table control. due to this only 17 entries are getting posted and then i get an error message saying the screen size is not enough. I used the concatenate index for the entries and also =P+. still my code isn't working. Please Help!.
I am pasting the code for your reference. please help me find where am i going wrong.
LOOP AT it_contract INTO wa_contract.
IF wa_contract-lifnr IS INITIAL.
if v_no gt 17.
perform bdc_dynpro using 'SAPMM06E' '220'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06E-EBELP'.
PERFORM bdc_field USING 'BDC_OKCODE' '=P+'.
CLEAR v_no.
v_no = 1.
endif.
CONCATENATE 'EKPO-NETPR(' v_no ')' INTO v_fld.
CONDENSE v_fld.
*
PERFORM bdc_field USING 'BDC_CURSOR'
v_fld.
CONCATENATE 'EKPO-EMATN(' v_no ')' INTO v_fld.
CONDENSE v_fld.
*perform bdc_field1 using V_FLD
* INFO_UPLOAD-KSCHL.
*perform bdc_field using 'BDC_CURSOR'
* 'EKPO-NETPR(01)'.
PERFORM bdc_field USING v_fld
wa_contract-ematn.
CONCATENATE 'EKPO-KTMNG(' v_no ')' INTO v_fld.
CONDENSE v_fld.
PERFORM bdc_field USING v_fld
wa_contract-ktmng.
CONCATENATE 'EKPO-NETPR(' v_no ')' INTO v_fld.
CONDENSE v_fld.
PERFORM bdc_field USING v_fld
wa_contract-netpr.
v_no = v_no + 1.
first = 'X'.
ELSE.
IF first = 'X'.
*last record to upload
PERFORM bdc_dynpro USING 'SAPLEKPA' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MMPA-EKORG(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=DISL'.
PERFORM bdc_field USING 'RM06E-SELKZ(01)'
'X'.
PERFORM bdc_dynpro USING 'SAPLEKPA' '0101'.
PERFORM bdc_field USING 'BDC_CURSOR'
'WRF02K-GPARN(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
PERFORM bdc_field USING 'MMPA-PARVW(02)'
pre_parvw.
PERFORM bdc_field USING 'WRF02K-GPARN(02)'
pre_gparn.
PERFORM bdc_dynpro USING 'SAPLEKPA' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MMPA-EKORG(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
PERFORM bdc_field USING 'RM06E-SELKZ(01)'
'X'.
PERFORM bdc_dynpro USING 'SAPMM06E' '0220'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06E-EBELP'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
*perform bdc_field using 'RM06E-EBELP'
* '10'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
PERFORM bdc_transaction USING 'ME31K'.
ENDIF.
* first record for new vendor
PERFORM bdc_dynpro USING 'SAPMM06E' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06E-WERKS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'EKKO-LIFNR'
wa_contract-lifnr.
PERFORM bdc_field USING 'RM06E-EVART'
wa_contract-evart.
PERFORM bdc_field USING 'RM06E-VEDAT'
wa_contract-vedat.
PERFORM bdc_field USING 'EKKO-EKORG'
wa_contract-ekorg.
PERFORM bdc_field USING 'EKKO-EKGRP'
wa_contract-ekgrp.
PERFORM bdc_field USING 'RM06E-WERKS'
wa_contract-werks.
PERFORM bdc_dynpro USING 'SAPMM06E' '0201'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EKKO-INCO2'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'EKKO-EKGRP'
wa_contract-ekgrp.
*perform bdc_field using 'EKKO-PINCR'
* wa_contract-.
*perform bdc_field using 'EKKO-UPINC'
* '1'.
year = wa_contract-kdatb+0(4).
month = wa_contract-kdatb+4(2).
day = wa_contract-kdatb+6(2).
CLEAR: year, month, day.
PERFORM bdc_field USING 'EKKO-KDATB'
wa_contract-kdatb.
year = wa_contract-kdate+0(4).
month = wa_contract-kdate+4(2).
day = wa_contract-kdate+6(2).
CLEAR: year, month, day.
PERFORM bdc_field USING 'EKKO-KDATE'
wa_contract-kdate.
*perform bdc_field using 'EKKO-SPRAS'
* 'EN'.
PERFORM bdc_field USING 'EKKO-ZTERM'
wa_contract-zterm.
PERFORM bdc_field USING 'EKKO-KTWRT'
wa_contract-ktwrt.
PERFORM bdc_field USING 'EKKO-WAERS'
wa_contract-waers.
*perform bdc_field using 'EKKO-WKURS'
* '/1.96050'.
PERFORM bdc_field USING 'EKKO-INCO1'
wa_contract-inco1.
PERFORM bdc_field USING 'EKKO-INCO2'
wa_contract-inco2.
PERFORM bdc_dynpro USING 'SAPMM06E' '0220'.
*for multiple records
PERFORM bdc_field USING 'BDC_CURSOR'
'EKPO-NETPR(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=PRTN'.
PERFORM bdc_field USING 'EKPO-EMATN(01)'
wa_contract-ematn.
PERFORM bdc_field USING 'EKPO-KTMNG(01)'
wa_contract-ktmng.
PERFORM bdc_field USING 'EKPO-NETPR(01)'
wa_contract-netpr.
first = 'X'.
pre_parvw = wa_contract-parvw.
pre_gparn = wa_contract-gparn.
v_no = 2. "
ENDIF.
ENDLOOP.
*it is for last record upload
PERFORM bdc_dynpro USING 'SAPLEKPA' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MMPA-EKORG(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=DISL'.
PERFORM bdc_field USING 'RM06E-SELKZ(01)'
'X'.
PERFORM bdc_dynpro USING 'SAPLEKPA' '0101'.
PERFORM bdc_field USING 'BDC_CURSOR'
'WRF02K-GPARN(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
PERFORM bdc_field USING 'MMPA-PARVW(02)'
pre_parvw.
PERFORM bdc_field USING 'WRF02K-GPARN(02)'
pre_gparn.
PERFORM bdc_dynpro USING 'SAPLEKPA' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MMPA-EKORG(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
PERFORM bdc_field USING 'RM06E-SELKZ(01)'
'X'.
PERFORM bdc_dynpro USING 'SAPMM06E' '0220'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM06E-EBELP'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
*perform bdc_field using 'RM06E-EBELP'
* '10'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
PERFORM bdc_transaction USING 'ME31K'.
PERFORM close_group.
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
*----------------------------------------------------------------------*
* Insert field *
*----------------------------------------------------------------------*
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> NODATA.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM.
Hello All,
My scenario is as follows:
1. I have a User Exit of EXIT_SAPLL03T_002 --> ZXLTOU02.
2. In the Include ZXLTOU02, I have a table itab.
3. The table has 5 entries during the processing of my exit. This itab is in a loop and for each loop a custom Function Module will be processed.
4. But the same exit will be called for other scenario.
5. In other scenario, the same table gets modified with 3 entries and gets processed.
6. When the control gets back to my scenario, I should have 5 entries for my scenario but the table itab has 3 entries from the other scenario.
I thought of using the following code for getting the table values from the current program (my scenario)
DATA: lt_exit TYPE STANDARD TABLE OF <<CUSTOM_TABBLE>>,
lv_tab TYPE char50.
FIELD-SYMBOLS : <fs_data_t> TYPE ANY TABLE .
lv_tab = '(ZXLTOU02)T_EXIT[]'.
ASSIGN (lv_tab) TO <fs_data_t>.
IF <fs_data_t> IS ASSIGNED .
t_exit[] = <fs_data_t>.
ENDIF.
But the above code will not be triggered as the control is still in the loop of my internal table .
Can anyone tell me how to fix this ?
Regards,
Deepu.K
Hi All The past two days I have been learning how create SAPSCRIPTS preparing for an upcoming project.
I created a form with only three elements a graph(logo), our address and a main window.
When I do a test print the form comes out fine but on SE38 when I execute the below code I get the message that the elements are not defined in the program.
REPORT Z_DEMO_TESTSCRIPT.
*----------------------------------------------------------------------*
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
form = 'Z_DEMO_TEMPLATE'. *
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'GRAPH1'
function = 'SET'
type = 'BODY'
window = 'MAIN' . *
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'OUR_ADDR'
function = 'SET'
type = 'BODY'
window = 'MAIN' .
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LOGO'
function = 'SET'
type = 'BODY'
window = 'MAIN' .
CALL FUNCTION 'CLOSE_FORM'.
What could I be missing?
Hi,
What will be the result of value_2 and value_3 ?
Using debug this what I get:
IMHO it needs to be like value4 .
Am I missing something here....
Regards.
The code:
DATA(value_2) = ( '5.555' + '1.77777' ) .
data c_1 TYPE p DECIMALS 3 VALUE '5.555' . " 1 of type Packed Number
data c_2 TYPE p DECIMALS 5 VALUE '1.77777' . " 2 of type Packed Number
DATA(value_3) = ( c_1 + c_2 ) .
DATA: value4 TYPE p DECIMALS 5 . " Data: value4 of type Packed Number
value4 = ( c_1 + c_2 ) .
Dear All,
I have written the following code segment :-
============================================================
DATA: l_mat_desc TYPE maktx.
SELECT SINGLE maktx FROM makt INTO l_mat_desc
WHERE matnr EQ '000000000000000007'.
IF sy-subrc = 0.
WRITE: l_mat_desc.
ENDIF.
==============================================================
Now when I perform an extended program check, I get the following warning:-
"
Syntax check warning. This warning is only displayed in SLIN In "SELECT SINGLE ...", the WHERE condition for a key field does not test for equality or the FROM clause contains a join. This means the result is possibly not unique. Internal message code: MESSAGE GSB |
"
Could you please tell me the reason for the same?
Thanks in advance!
Best Regards,
Harish
Hi Guru's
I will explain my program and please suggest where i need to put clear. Even, i used debugger, but not able to understand.
Selected the EKKO table (item table) with EBELN, and it's contain multiple line item (2 rows).
and i looped in this table (loop at IT! into WA), in this loop, selected the EKBE table with movement type 101 and EBELN.(used be SELECT END SECLECT) Hence, here also two line items has selected (checked data dictionary).
My question, two time EBLEN has passed in loop or one time EBELN has passed. Because, I need to collect the total line item value of PO and GRN.
According to my code, I am getting value as multiplied by two. Also please suggest where i need to use CLEAR.
Rgds,
Ganapathi Raman P
Hi All,
I am looking for an exit or badi or other to check( with authorization check) workorder before change it with IW32 Tcode.
Thanks in advance for your help.
Regards.
Hi all,
I have a work area with so many fields. Those fields contains values. I need to change that work area values with slash(/) based on certain requirement. How to change without using MOVE or Move corresponding.
Please help me on this.
Regards
nageswar
Hello
I have business requirement to give warning message and send mail if mail id is not maintained in release strategy. The problem is i have to check ztable for mail id in which combination of fields : FRGGR, FRGCO and EKGRP needs to be checked. I have checked all the exit and BADI at the time of saving PO (ME21N) but not able to find field FRGCO in any exit or BADI at time of saving. Then I tried to look for import/export or set/get statement in which i am going to pass FRGCO field to BADI(ME_PROCESS_PO_CUST) and use it. But problem is I am not able to find the proper place in standard program to put export statement for FRGCO field. I tried to find the FRGCO field in standard PO program (SAPLMEGUI) but so far failed to find it. Please help me to give solution to the problem or where i can find the FRGCO field in PO program. Thanks.
Regards
Virendra Singh Somvanshi
Dear forumers,
I have a report program that takes the following data inputs in its selection screen:-
- Billing Document Number (multiple data inputs possible)
- Output Type (single data input only)
- Transmission Medium (single data input only)
- Email Address (multiple data inputs possible)
The program will generate the corresponding PDF output for each billing document number and then mail each output as an attachment to the specified email addresses.
When developing this report program, I refer to the program, RLB_INVOICE for inspiration.
In this report program, it also reads the latest matching NAST table record (based on the billing document number, output type and transmission medium).
This NAST table record is then required when calling the FM, LB_BIL_INV_OUTP_READ_PRTDATA and then finally the smartform's FM.
The NAST table record is required here:-
CLEAR lwa_bil_invoice.
CALL FUNCTION 'LB_BIL_INV_OUTP_READ_PRTDATA'
EXPORTING
if_bil_number = lwa_nast-objky
if_parvw = lwa_nast-parvw
if_parnr = lwa_nast-parnr
if_language = lwa_nast-spras
is_print_data_to_read = lwa_print_data_to_read
IMPORTING
es_bil_invoice = lwa_bil_invoice
EXCEPTIONS
records_not_found = 1
records_not_requested = 2
OTHERS = 3.
And here:-
IF p_kschl = 'ZVA1'.
CLEAR lwa_job_info.
CALL FUNCTION pv_smartform_fm_name
EXPORTING
control_parameters = lwa_control
output_options = lwa_composer
user_settings = space
is_bil_invoice = lwa_bil_invoice
is_nast = lwa_nast
is_repeat = space
copy_count = '1'
IMPORTING
job_output_info = lwa_job_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDIF.
The issue now is:-
If the user enters '3' or '5' as the transmission medium in the selection screen, and there may not be such matching NAST table record at that moment, the smartform FM could not be executed for generating the PDF output - and no email as well, in the end.
So, is there any way that I can resolve this issue by instead creating a NAST table record based on the user's inputs here?
If so, how may I do that?
Appreciate your help here.
Thanks in advance.