Blocking multiple vendors
Hi Guys,
The user wants to block multiple vendors in SAP like say some 1500.
How is this possible.
Please advise..
thanks
srikanth
HI ,
yes it's possible vendor block.
t.code xk05
or
other soluation if u r create bdc use , so it very easy vendor multiple block.
thanks
rohit
Similar Messages
-
Opening & closing balance for Multiple Vendors
Hi Friends,
I have an issue. This is my code.
*& Report ZVEN_OPEN_CLOSE_BAL
REPORT ZVEN_OPEN_CLOSE_BAL.
*& Report ZVEN_OPEN_CLOSE_BAL
TABLES:lfa1,bsik.
TYPES: BEGIN OF ty_bsik,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-lifnr,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
xblnr TYPE bsik-xblnr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
blart TYPE bsik-blart,
bldat TYPE bsik-bldat,
budat TYPE bsik-budat,
shkzg TYPE bsik-shkzg,
dmbtr TYPE bsik-dmbtr,
* bal TYPE char30,
sgtxt TYPE bsik-sgtxt,
END OF ty_bsik.
TYPES: BEGIN OF ty_bsak,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsak-lifnr,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
shkzg TYPE bsak-shkzg,
dmbtr TYPE bsik-dmbtr,
* shkzg1 TYPE bsak-shkzg,
sgtxt TYPE bsak-sgtxt,
END OF ty_bsak.
TYPES: BEGIN OF ty_lfc1,
lifnr TYPE lfc1-lifnr,
bukrs TYPE lfc1-bukrs,
gjahr TYPE lfc1-gjahr,
umsav TYPE lfc1-umsav,
END OF ty_lfc1.
TYPES: BEGIN OF ty_all,
lifnr TYPE bsik-lifnr,
zuonr TYPE bsik-zuonr,
xblnr TYPE bsik-xblnr,
belnr TYPE bsik-belnr,
hkont TYPE bseg-hkont,
blart TYPE bsik-blart,
ltext TYPE text20,
bldat TYPE bsik-bldat,
budat TYPE bsik-budat,
opbal TYPE p DECIMALS 2,
deb TYPE p DECIMALS 2 ,"bsik-dmbtr,
cre TYPE p DECIMALS 2,"bsik-dmbtr,
bal TYPE p DECIMALS 2,
augbl TYPE bsik-augbl,
sgtxt TYPE bsik-sgtxt,
END OF ty_all.
TYPE-POOLS: slis.
DATA: t_layout TYPE slis_layout_alv,
s_fieldtab TYPE slis_fieldcat_alv,
t_fieldtab TYPE slis_t_fieldcat_alv,
wa_header TYPE slis_listheader,
it_header TYPE slis_t_listheader.
DATA:it_bsik TYPE TABLE OF ty_bsik,
it_bsak TYPE TABLE OF ty_bsak,
it_all TYPE TABLE OF ty_all,
it_lfc1 TYPE TABLE OF ty_lfc1,
it_t003 TYPE TABLE OF t003t,
wa_bsik TYPE ty_bsik,
wa_bsak TYPE ty_bsak,
wa_all TYPE ty_all,
wa_lfc1 TYPE ty_lfc1,
wa_t003 TYPE t003t.
DATA: gt_fldcat TYPE slis_t_fieldcat_alv,
gs_fldcat TYPE slis_fieldcat_alv,
gs_layout TYPE slis_layout_alv,
gv_save TYPE c VALUE 'X'.
types :BEGIN OF ty_bseg,
BUKRS TYPE BUKRS,
BELNR TYPE BELNR_D,
GJAHR TYPE GJAHR,
BUZEI TYPE BUZEI,
koart type koart,
HKONT TYPE HKONT,
END OF ty_bseg.
DATA: it_bseg type TABLE OF ty_bseg,
wa_bseg type ty_bseg.
data t_balence TYPE TABLE OF BAPI3008_3 WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr,
s_bukrs FOR bsik-bukrs,
s_budat FOR bsik-budat OBLIGATORY.
PARAMETERS : p_gjahr TYPE bsik-gjahr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
PERFORM get_data.
PERFORM process_data.
PERFORM display.
*& Form GET_DATA
* text
* --> p1 text
* <-- p2 text
FORM get_data .
break naidu.
SELECT bukrs
lifnr
augbl
zuonr
gjahr
xblnr
belnr
buzei
blart
bldat
budat
shkzg
dmbtr
sgtxt FROM bsik
INTO TABLE it_bsik
WHERE lifnr IN s_lifnr AND
bukrs IN s_bukrs AND
budat IN s_budat AND
gjahr = p_gjahr .
SELECT bukrs
lifnr
augbl
zuonr
gjahr
belnr
buzei
budat
bldat
xblnr
blart
shkzg
dmbtr
sgtxt FROM bsak
INTO TABLE it_bsak
WHERE lifnr IN s_lifnr AND
bukrs IN s_bukrs AND
budat IN s_budat AND
gjahr = p_gjahr .
if it_bsik is INITIAL and it_bsak is INITIAL.
*DATA v_date type budat.
*data :year(4),
* month(2),
* date(2).
* year = s_budat-low+0(4).
* date = s_budat-low+6(2).
* month = s_budat-low+4(2).
* month = month - 01.
*CONCATENATE year month date INTO v_date .
* SELECT bukrs
* lifnr
* augbl
* zuonr
* gjahr
* xblnr
* belnr
* buzei
* blart
* bldat
* budat
* shkzg
* dmbtr
* sgtxt FROM bsik
* INTO TABLE it_bsik
* WHERE lifnr IN s_lifnr AND
* bukrs in s_bukrs and
* budat eq v_date AND
* gjahr = p_gjahr .
* SELECT bukrs
* lifnr
* augbl
* zuonr
* gjahr
* belnr
* buzei
* budat
* bldat
* xblnr
* blart
* shkzg
* dmbtr
* sgtxt FROM bsak
* INTO TABLE it_bsak
* WHERE lifnr IN s_lifnr AND
* bukrs IN s_bukrs AND
* budat eq v_date AND
* gjahr = p_gjahr .
CALL FUNCTION 'BAPI_AP_ACC_GETKEYDATEBALANCE'
EXPORTING
companycode = s_bukrs-low
vendor = s_lifnr-low
keydate = s_budat-low
* BALANCESPGLI = ' '
* NOTEDITEMS = ' '
* IMPORTING
* RETURN =
TABLES
keybalance = t_balence
endif.
ENDFORM. " GET_DATA
*& Form PROCESS_DATA
* text
* --> p1 text
* <-- p2 text
FORM process_data .
DATA:v_bal TYPE netpr.
LOOP AT it_bsak INTO wa_bsak.
wa_bsik-bukrs = wa_bsak-bukrs.
wa_bsik-lifnr = wa_bsak-lifnr.
wa_bsik-augbl = wa_bsak-augbl.
wa_bsik-zuonr = wa_bsak-zuonr.
wa_bsik-gjahr = wa_bsak-gjahr.
wa_bsik-belnr = wa_bsak-belnr.
wa_bsik-buzei = wa_bsak-buzei.
wa_bsik-budat = wa_bsak-budat.
wa_bsik-bldat = wa_bsak-bldat.
wa_bsik-xblnr = wa_bsak-xblnr.
wa_bsik-blart = wa_bsak-blart.
wa_bsik-shkzg = wa_bsak-shkzg.
wa_bsik-dmbtr = wa_bsak-dmbtr.
wa_bsik-sgtxt = wa_bsak-sgtxt .
APPEND wa_bsik TO it_bsik.
CLEAR:wa_bsik.
ENDLOOP.
IF it_bsik IS NOT INITIAL .
SELECT lifnr bukrs gjahr umsav
FROM lfc1
INTO TABLE it_lfc1 FOR ALL ENTRIES IN it_bsik
WHERE
lifnr EQ it_bsik-lifnr AND
bukrs EQ it_bsik-bukrs AND
gjahr EQ it_bsik-gjahr.
SELECT * FROM t003t
INTO TABLE it_t003
FOR ALL ENTRIES IN it_bsik
WHERE blart = it_bsik-blart AND
spras = 'EN'.
*&Bindu........................................
select bukrs "Company Code
belnr "Document Number
gjahr "Fiscal Year
buzei "Line item
koart "Account Type
hkont "General Ledger Account
from bseg into TABLE it_bseg
FOR ALL ENTRIES IN it_bsik
WHERE belnr eq it_bsik-belnr and
bukrs in s_bukrs and
gjahr eq p_gjahr and
BUZEI eq it_bsik-buzei.
ENDIF.
SORT it_bsik BY lifnr.
DATA:c,
l_dmbtr type p DECIMALS 2.
DATA:v1(15),
v2(3).
DATA:v_umsav(18).
DATA v_fbal TYPE umsav.
LOOP AT it_bsik INTO wa_bsik.
READ TABLE it_lfc1 INTO wa_lfc1 WITH KEY lifnr = wa_bsik-lifnr
bukrs = wa_bsik-bukrs
gjahr = wa_bsik-gjahr.
if sy-subrc = 0.
at FIRST.
v_umsav = wa_lfc1-umsav.
SPLIT v_umsav at '.' INTO v1 v2.
wa_all-LTEXT = 'Opening Balance'.
IF v2+2(1) = '-'.
wa_all-cre = wa_lfc1-umsav.
ELSE.
wa_all-deb = wa_lfc1-umsav.
ENDIF.
wa_all-bal = wa_lfc1-umsav.
v_fbal = wa_all-bal.
APPEND wa_all to it_all.
CLEAR wa_all.
endat.
endif.
AT NEW lifnr.
c = 0.
ENDAT.
wa_all-lifnr = wa_bsik-lifnr.
wa_all-zuonr = wa_bsik-zuonr.
wa_all-xblnr = wa_bsik-xblnr.
wa_all-belnr = wa_bsik-belnr.
wa_all-blart = wa_bsik-blart.
wa_all-bldat = wa_bsik-bldat.
wa_all-budat = wa_bsik-budat.
*&Bindu............
READ TABLE it_bseg into wa_bseg WITH KEY belnr = wa_bsik-belnr
buzei = wa_bsik-buzei."Bindu.......
if sy-subrc = 0.
wa_all-hkont = wa_bseg-hkont. "Bindu.....
endif.
IF wa_bsik-shkzg = 'S'.
wa_all-deb = wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_all-cre = wa_bsik-dmbtr.
ENDIF.
READ TABLE it_t003 INTO wa_t003 WITH KEY blart = wa_bsik-blart.
IF sy-subrc = 0.
wa_all-ltext = wa_t003-ltext.
ENDIF.
* READ TABLE it_lfc1 INTO wa_lfc1 WITH KEY lifnr = wa_bsik-lifnr
* bukrs = wa_bsik-bukrs
* gjahr = wa_bsik-gjahr.
*break naidu.
IF sy-subrc = 0.
* IF c = 0.
* clear:l_dmbtr.
* wa_all-opbal = wa_lfc1-umsav.
* c = c + 1.
* IF wa_bsik-shkzg = 'S'.
* wa_all-bal = wa_all-opbal + wa_bsik-dmbtr.
* ELSEIF wa_bsik-shkzg = 'H'.
* wa_all-bal = wa_all-opbal - wa_bsik-dmbtr.
* ENDIF.
l_dmbtr = wa_all-bal.
* ELSE.
* wa_all-bal = l_dmbtr + wa_bsik-dmbtr.
* ELSEIF wa_bsik-shkzg = 'H'.
* wa_all-bal = l_dmbtr - wa_bsik-dmbtr.
* ENDIF.
ENDIF.
* IF wa_bsik-shkzg = 'S'.
* wa_all-bal = wa_all-opbal + wa_bsik-dmbtr.
* ELSEIF wa_bsik-shkzg = 'H'.
* wa_all-bal = wa_all-opbal - wa_bsik-dmbtr.
* ENDIF.
if v_fbal is NOT INITIAL.
wa_all-bal = v_fbal + wa_all-deb - wa_all-cre.
CLEAR:v_fbal.
else.
wa_all-bal = v_bal + wa_all-deb - wa_all-cre.
ENDIF.
wa_all-augbl = wa_bsik-augbl.
wa_all-sgtxt = wa_bsik-sgtxt.
*v_balance = wa_all-bal.
APPEND wa_all TO it_all.
v_bal = wa_all-bal.
CLEAR :wa_all.
*& Closing Balence.................
at last.
wa_all-LTEXT = 'Closing Balance'.
* IF .
wa_all-BAL = v_bal.
APPEND wa_all to it_all.
CLEAR wa_all.
* ENDIF.
endat.
ENDLOOP.
ENDFORM. " PROCESS_DATA
*& Form DISPLAY
* text
* --> p1 text
* <-- p2 text
FORM display .
DATA : ls_layout TYPE slis_layout_alv.
PERFORM create_fldcat.
ls_layout-expand_all = 'X'.
ls_layout-colwidth_optimize = 'X'.
ls_layout-expand_fieldname = 'X'.
ls_layout-zebra = 'X'.
if it_all is initial .
wa_all-LTEXT = 'Opening Balance'.
wa_all-bal = t_balence-LC_BAL.
wa_all-lifnr = s_lifnr-low.
APPEND wa_all to it_all.
ENDIF.
IF it_all IS NOT INITIAL.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = ls_layout
it_fieldcat = gt_fldcat
i_save = 'X'
TABLES
t_outtab = it_all[]
EXCEPTIONS
program_error = 1
OTHERS = 2.
ELSE.
MESSAGE 'There is no Data for the given selection screen' TYPE 'I' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " DISPLAY
*& Form CREATE_FLDCAT
* text
* --> p1 text
* <-- p2 text
FORM create_fldcat .
PERFORM : append_val USING 'LIFNR' 'IT_ALL' 'vendor' '' '' 'X' ' '.
PERFORM : append_val USING 'HKONT' 'IT_ALL' 'G/L Acc' '' '' 'X' ' '.
PERFORM : append_val USING 'ZUONR' 'IT_ALL' 'account' '' '' '' ''.
PERFORM : append_val USING 'XBLNR' 'IT_ALL' 'number' '' '' 'X' ''.
PERFORM : append_val USING 'BELNR' 'IT_ALL' 'ref no' '' '' 'X' ''.
PERFORM : append_val USING 'BLART' 'IT_ALL' 'type' '' '' 'X' ''.
PERFORM : append_val USING 'LTEXT' 'IT_ALL' 'type text' '' '' 'X' ''.
PERFORM : append_val USING 'BLDAT' 'IT_ALL' 'doc date' '' '' 'X' ''.
PERFORM : append_val USING 'BUDAT' 'IT_ALL' 'post date' '' '' 'X' ''.
PERFORM : append_val USING 'OPBAL' 'IT_ALL' 'op balance' '' '' '' ''.
PERFORM : append_val USING 'DEB' 'IT_ALL' 'debit' '' '' '' ''.
PERFORM : append_val USING 'CRE' 'IT_ALL' 'credit' '' '' '' ''.
PERFORM : append_val USING 'BAL' 'IT_ALL' 'balance' '' '' '' ''.
PERFORM : append_val USING 'AUGBL' 'IT_ALL' 'clr doc' '' '' 'X' ''.
PERFORM : append_val USING 'SGTXT' 'IT_ALL' 'text ' '' '' 'X' ''.
ENDFORM. " CREATE_FLDCAT
*& Form APPEND_VAL
* text
* -->P_0578 text
* -->P_0579 text
* -->P_TEXT_010 text
* -->P_0581 text
* -->P_0582 text
* -->P_0583 text
FORM append_val USING p_a
p_b
p_c
p_d
p_e
p_f
p_g.
CLEAR gs_fldcat.
gs_fldcat-fieldname = p_a.
gs_fldcat-tabname = p_b.
gs_fldcat-seltext_m = p_c.
gs_fldcat-qfieldname = p_d.
gs_fldcat-datatype = p_e.
gs_fldcat-no_zero = p_f.
gs_fldcat-do_sum = p_g.
APPEND gs_fldcat TO gt_fldcat.
ENDFORM. " APPEND_VAL
This is working for single vendor.
Now my problem is Opening & closing balance should be displayed for multiple vendors.
Please suggest me.
Thanks in advance.Hi Friends,
I have an issue. This is my code.
*& Report ZVEN_OPEN_CLOSE_BAL
REPORT ZVEN_OPEN_CLOSE_BAL.
*& Report ZVEN_OPEN_CLOSE_BAL
TABLES:lfa1,bsik.
TYPES: BEGIN OF ty_bsik,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-lifnr,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
xblnr TYPE bsik-xblnr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
blart TYPE bsik-blart,
bldat TYPE bsik-bldat,
budat TYPE bsik-budat,
shkzg TYPE bsik-shkzg,
dmbtr TYPE bsik-dmbtr,
* bal TYPE char30,
sgtxt TYPE bsik-sgtxt,
END OF ty_bsik.
TYPES: BEGIN OF ty_bsak,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsak-lifnr,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
shkzg TYPE bsak-shkzg,
dmbtr TYPE bsik-dmbtr,
* shkzg1 TYPE bsak-shkzg,
sgtxt TYPE bsak-sgtxt,
END OF ty_bsak.
TYPES: BEGIN OF ty_lfc1,
lifnr TYPE lfc1-lifnr,
bukrs TYPE lfc1-bukrs,
gjahr TYPE lfc1-gjahr,
umsav TYPE lfc1-umsav,
END OF ty_lfc1.
TYPES: BEGIN OF ty_all,
lifnr TYPE bsik-lifnr,
zuonr TYPE bsik-zuonr,
xblnr TYPE bsik-xblnr,
belnr TYPE bsik-belnr,
hkont TYPE bseg-hkont,
blart TYPE bsik-blart,
ltext TYPE text20,
bldat TYPE bsik-bldat,
budat TYPE bsik-budat,
opbal TYPE p DECIMALS 2,
deb TYPE p DECIMALS 2 ,"bsik-dmbtr,
cre TYPE p DECIMALS 2,"bsik-dmbtr,
bal TYPE p DECIMALS 2,
augbl TYPE bsik-augbl,
sgtxt TYPE bsik-sgtxt,
END OF ty_all.
TYPE-POOLS: slis.
DATA: t_layout TYPE slis_layout_alv,
s_fieldtab TYPE slis_fieldcat_alv,
t_fieldtab TYPE slis_t_fieldcat_alv,
wa_header TYPE slis_listheader,
it_header TYPE slis_t_listheader.
DATA:it_bsik TYPE TABLE OF ty_bsik,
it_bsak TYPE TABLE OF ty_bsak,
it_all TYPE TABLE OF ty_all,
it_lfc1 TYPE TABLE OF ty_lfc1,
it_t003 TYPE TABLE OF t003t,
wa_bsik TYPE ty_bsik,
wa_bsak TYPE ty_bsak,
wa_all TYPE ty_all,
wa_lfc1 TYPE ty_lfc1,
wa_t003 TYPE t003t.
DATA: gt_fldcat TYPE slis_t_fieldcat_alv,
gs_fldcat TYPE slis_fieldcat_alv,
gs_layout TYPE slis_layout_alv,
gv_save TYPE c VALUE 'X'.
types :BEGIN OF ty_bseg,
BUKRS TYPE BUKRS,
BELNR TYPE BELNR_D,
GJAHR TYPE GJAHR,
BUZEI TYPE BUZEI,
koart type koart,
HKONT TYPE HKONT,
END OF ty_bseg.
DATA: it_bseg type TABLE OF ty_bseg,
wa_bseg type ty_bseg.
data t_balence TYPE TABLE OF BAPI3008_3 WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr,
s_bukrs FOR bsik-bukrs,
s_budat FOR bsik-budat OBLIGATORY.
PARAMETERS : p_gjahr TYPE bsik-gjahr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
PERFORM get_data.
PERFORM process_data.
PERFORM display.
*& Form GET_DATA
* text
* --> p1 text
* <-- p2 text
FORM get_data .
break naidu.
SELECT bukrs
lifnr
augbl
zuonr
gjahr
xblnr
belnr
buzei
blart
bldat
budat
shkzg
dmbtr
sgtxt FROM bsik
INTO TABLE it_bsik
WHERE lifnr IN s_lifnr AND
bukrs IN s_bukrs AND
budat IN s_budat AND
gjahr = p_gjahr .
SELECT bukrs
lifnr
augbl
zuonr
gjahr
belnr
buzei
budat
bldat
xblnr
blart
shkzg
dmbtr
sgtxt FROM bsak
INTO TABLE it_bsak
WHERE lifnr IN s_lifnr AND
bukrs IN s_bukrs AND
budat IN s_budat AND
gjahr = p_gjahr .
if it_bsik is INITIAL and it_bsak is INITIAL.
*DATA v_date type budat.
*data :year(4),
* month(2),
* date(2).
* year = s_budat-low+0(4).
* date = s_budat-low+6(2).
* month = s_budat-low+4(2).
* month = month - 01.
*CONCATENATE year month date INTO v_date .
* SELECT bukrs
* lifnr
* augbl
* zuonr
* gjahr
* xblnr
* belnr
* buzei
* blart
* bldat
* budat
* shkzg
* dmbtr
* sgtxt FROM bsik
* INTO TABLE it_bsik
* WHERE lifnr IN s_lifnr AND
* bukrs in s_bukrs and
* budat eq v_date AND
* gjahr = p_gjahr .
* SELECT bukrs
* lifnr
* augbl
* zuonr
* gjahr
* belnr
* buzei
* budat
* bldat
* xblnr
* blart
* shkzg
* dmbtr
* sgtxt FROM bsak
* INTO TABLE it_bsak
* WHERE lifnr IN s_lifnr AND
* bukrs IN s_bukrs AND
* budat eq v_date AND
* gjahr = p_gjahr .
CALL FUNCTION 'BAPI_AP_ACC_GETKEYDATEBALANCE'
EXPORTING
companycode = s_bukrs-low
vendor = s_lifnr-low
keydate = s_budat-low
* BALANCESPGLI = ' '
* NOTEDITEMS = ' '
* IMPORTING
* RETURN =
TABLES
keybalance = t_balence
endif.
ENDFORM. " GET_DATA
*& Form PROCESS_DATA
* text
* --> p1 text
* <-- p2 text
FORM process_data .
DATA:v_bal TYPE netpr.
LOOP AT it_bsak INTO wa_bsak.
wa_bsik-bukrs = wa_bsak-bukrs.
wa_bsik-lifnr = wa_bsak-lifnr.
wa_bsik-augbl = wa_bsak-augbl.
wa_bsik-zuonr = wa_bsak-zuonr.
wa_bsik-gjahr = wa_bsak-gjahr.
wa_bsik-belnr = wa_bsak-belnr.
wa_bsik-buzei = wa_bsak-buzei.
wa_bsik-budat = wa_bsak-budat.
wa_bsik-bldat = wa_bsak-bldat.
wa_bsik-xblnr = wa_bsak-xblnr.
wa_bsik-blart = wa_bsak-blart.
wa_bsik-shkzg = wa_bsak-shkzg.
wa_bsik-dmbtr = wa_bsak-dmbtr.
wa_bsik-sgtxt = wa_bsak-sgtxt .
APPEND wa_bsik TO it_bsik.
CLEAR:wa_bsik.
ENDLOOP.
IF it_bsik IS NOT INITIAL .
SELECT lifnr bukrs gjahr umsav
FROM lfc1
INTO TABLE it_lfc1 FOR ALL ENTRIES IN it_bsik
WHERE
lifnr EQ it_bsik-lifnr AND
bukrs EQ it_bsik-bukrs AND
gjahr EQ it_bsik-gjahr.
SELECT * FROM t003t
INTO TABLE it_t003
FOR ALL ENTRIES IN it_bsik
WHERE blart = it_bsik-blart AND
spras = 'EN'.
*&Bindu........................................
select bukrs "Company Code
belnr "Document Number
gjahr "Fiscal Year
buzei "Line item
koart "Account Type
hkont "General Ledger Account
from bseg into TABLE it_bseg
FOR ALL ENTRIES IN it_bsik
WHERE belnr eq it_bsik-belnr and
bukrs in s_bukrs and
gjahr eq p_gjahr and
BUZEI eq it_bsik-buzei.
ENDIF.
SORT it_bsik BY lifnr.
DATA:c,
l_dmbtr type p DECIMALS 2.
DATA:v1(15),
v2(3).
DATA:v_umsav(18).
DATA v_fbal TYPE umsav.
LOOP AT it_bsik INTO wa_bsik.
READ TABLE it_lfc1 INTO wa_lfc1 WITH KEY lifnr = wa_bsik-lifnr
bukrs = wa_bsik-bukrs
gjahr = wa_bsik-gjahr.
if sy-subrc = 0.
at FIRST.
v_umsav = wa_lfc1-umsav.
SPLIT v_umsav at '.' INTO v1 v2.
wa_all-LTEXT = 'Opening Balance'.
IF v2+2(1) = '-'.
wa_all-cre = wa_lfc1-umsav.
ELSE.
wa_all-deb = wa_lfc1-umsav.
ENDIF.
wa_all-bal = wa_lfc1-umsav.
v_fbal = wa_all-bal.
APPEND wa_all to it_all.
CLEAR wa_all.
endat.
endif.
AT NEW lifnr.
c = 0.
ENDAT.
wa_all-lifnr = wa_bsik-lifnr.
wa_all-zuonr = wa_bsik-zuonr.
wa_all-xblnr = wa_bsik-xblnr.
wa_all-belnr = wa_bsik-belnr.
wa_all-blart = wa_bsik-blart.
wa_all-bldat = wa_bsik-bldat.
wa_all-budat = wa_bsik-budat.
*&Bindu............
READ TABLE it_bseg into wa_bseg WITH KEY belnr = wa_bsik-belnr
buzei = wa_bsik-buzei."Bindu.......
if sy-subrc = 0.
wa_all-hkont = wa_bseg-hkont. "Bindu.....
endif.
IF wa_bsik-shkzg = 'S'.
wa_all-deb = wa_bsik-dmbtr.
ELSEIF wa_bsik-shkzg = 'H'.
wa_all-cre = wa_bsik-dmbtr.
ENDIF.
READ TABLE it_t003 INTO wa_t003 WITH KEY blart = wa_bsik-blart.
IF sy-subrc = 0.
wa_all-ltext = wa_t003-ltext.
ENDIF.
* READ TABLE it_lfc1 INTO wa_lfc1 WITH KEY lifnr = wa_bsik-lifnr
* bukrs = wa_bsik-bukrs
* gjahr = wa_bsik-gjahr.
*break naidu.
IF sy-subrc = 0.
* IF c = 0.
* clear:l_dmbtr.
* wa_all-opbal = wa_lfc1-umsav.
* c = c + 1.
* IF wa_bsik-shkzg = 'S'.
* wa_all-bal = wa_all-opbal + wa_bsik-dmbtr.
* ELSEIF wa_bsik-shkzg = 'H'.
* wa_all-bal = wa_all-opbal - wa_bsik-dmbtr.
* ENDIF.
l_dmbtr = wa_all-bal.
* ELSE.
* wa_all-bal = l_dmbtr + wa_bsik-dmbtr.
* ELSEIF wa_bsik-shkzg = 'H'.
* wa_all-bal = l_dmbtr - wa_bsik-dmbtr.
* ENDIF.
ENDIF.
* IF wa_bsik-shkzg = 'S'.
* wa_all-bal = wa_all-opbal + wa_bsik-dmbtr.
* ELSEIF wa_bsik-shkzg = 'H'.
* wa_all-bal = wa_all-opbal - wa_bsik-dmbtr.
* ENDIF.
if v_fbal is NOT INITIAL.
wa_all-bal = v_fbal + wa_all-deb - wa_all-cre.
CLEAR:v_fbal.
else.
wa_all-bal = v_bal + wa_all-deb - wa_all-cre.
ENDIF.
wa_all-augbl = wa_bsik-augbl.
wa_all-sgtxt = wa_bsik-sgtxt.
*v_balance = wa_all-bal.
APPEND wa_all TO it_all.
v_bal = wa_all-bal.
CLEAR :wa_all.
*& Closing Balence.................
at last.
wa_all-LTEXT = 'Closing Balance'.
* IF .
wa_all-BAL = v_bal.
APPEND wa_all to it_all.
CLEAR wa_all.
* ENDIF.
endat.
ENDLOOP.
ENDFORM. " PROCESS_DATA
*& Form DISPLAY
* text
* --> p1 text
* <-- p2 text
FORM display .
DATA : ls_layout TYPE slis_layout_alv.
PERFORM create_fldcat.
ls_layout-expand_all = 'X'.
ls_layout-colwidth_optimize = 'X'.
ls_layout-expand_fieldname = 'X'.
ls_layout-zebra = 'X'.
if it_all is initial .
wa_all-LTEXT = 'Opening Balance'.
wa_all-bal = t_balence-LC_BAL.
wa_all-lifnr = s_lifnr-low.
APPEND wa_all to it_all.
ENDIF.
IF it_all IS NOT INITIAL.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = ls_layout
it_fieldcat = gt_fldcat
i_save = 'X'
TABLES
t_outtab = it_all[]
EXCEPTIONS
program_error = 1
OTHERS = 2.
ELSE.
MESSAGE 'There is no Data for the given selection screen' TYPE 'I' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " DISPLAY
*& Form CREATE_FLDCAT
* text
* --> p1 text
* <-- p2 text
FORM create_fldcat .
PERFORM : append_val USING 'LIFNR' 'IT_ALL' 'vendor' '' '' 'X' ' '.
PERFORM : append_val USING 'HKONT' 'IT_ALL' 'G/L Acc' '' '' 'X' ' '.
PERFORM : append_val USING 'ZUONR' 'IT_ALL' 'account' '' '' '' ''.
PERFORM : append_val USING 'XBLNR' 'IT_ALL' 'number' '' '' 'X' ''.
PERFORM : append_val USING 'BELNR' 'IT_ALL' 'ref no' '' '' 'X' ''.
PERFORM : append_val USING 'BLART' 'IT_ALL' 'type' '' '' 'X' ''.
PERFORM : append_val USING 'LTEXT' 'IT_ALL' 'type text' '' '' 'X' ''.
PERFORM : append_val USING 'BLDAT' 'IT_ALL' 'doc date' '' '' 'X' ''.
PERFORM : append_val USING 'BUDAT' 'IT_ALL' 'post date' '' '' 'X' ''.
PERFORM : append_val USING 'OPBAL' 'IT_ALL' 'op balance' '' '' '' ''.
PERFORM : append_val USING 'DEB' 'IT_ALL' 'debit' '' '' '' ''.
PERFORM : append_val USING 'CRE' 'IT_ALL' 'credit' '' '' '' ''.
PERFORM : append_val USING 'BAL' 'IT_ALL' 'balance' '' '' '' ''.
PERFORM : append_val USING 'AUGBL' 'IT_ALL' 'clr doc' '' '' 'X' ''.
PERFORM : append_val USING 'SGTXT' 'IT_ALL' 'text ' '' '' 'X' ''.
ENDFORM. " CREATE_FLDCAT
*& Form APPEND_VAL
* text
* -->P_0578 text
* -->P_0579 text
* -->P_TEXT_010 text
* -->P_0581 text
* -->P_0582 text
* -->P_0583 text
FORM append_val USING p_a
p_b
p_c
p_d
p_e
p_f
p_g.
CLEAR gs_fldcat.
gs_fldcat-fieldname = p_a.
gs_fldcat-tabname = p_b.
gs_fldcat-seltext_m = p_c.
gs_fldcat-qfieldname = p_d.
gs_fldcat-datatype = p_e.
gs_fldcat-no_zero = p_f.
gs_fldcat-do_sum = p_g.
APPEND gs_fldcat TO gt_fldcat.
ENDFORM. " APPEND_VAL
This is working for single vendor.
Now my problem is Opening & closing balance should be displayed for multiple vendors.
Please suggest me.
Thanks in advance. -
Converting report output to pdf by submit spooland email to multiple vendor
Hi all,
my current program converting the report output to pdf and then downaloding andsending to vendor email.If user enter single vendor is o.k. but if suppose user enter multiple vendors,report is dipalying with multiple vendor information and all this information converting to one pdf file only.but i need particular vendor pdf have particular vendor info only excluding remaining vendor info.I am pasting my code.can anyone suggest?
TYPES: BEGIN OF type_data,
lifnr TYPE ekko-lifnr,
matnr TYPE lips-matnr,
vgbel TYPE lips-vgbel,
vgpos TYPE lips-vgpos,
mfrgr TYPE lips-mfrgr,
vbeln TYPE ekes-vbeln,
erdat TYPE ekes-erdat,
lfdat TYPE ekes-eindt,
lgort TYPE lips-lgort,
verur TYPE ekes-xblnr,
lfuhr TYPE ekes-uzeit,
lfimg TYPE lips-lfimg,
meins TYPE lips-meins,
posnr TYPE lips-posnr,
kdmat TYPE lips-kdmat,
dabmg TYPE ekes-dabmg,
eindt TYPE eket-eindt,
* Add by liza DEVK989704
park TYPE ZPO_PARK-menge,
* End by liza DEVK989704
END OF type_data.
DATA: gt_data TYPE STANDARD TABLE OF type_data.
DATA: gw_data LIKE LINE OF gt_data.
form display_list.
DATA: lv_maktx TYPE makt-maktx,
lv_adv(01) TYPE c.
DATA: lv_menge TYPE zomm_t0104m-menge.
*-- Set titles
title1 = 'Shipping notifications'.
title2 = '(Formerly Known As Matsushita Industrial )'.
title3 = sy-title.
IF NOT pa_fax IS INITIAL.
NEW-PAGE LINE-SIZE 120 LINE-COUNT 44.
title3 = 'Outstanding shipping notifications by supplier'.
ENDIF.
SORT gt_data BY lifnr lfdat matnr vgbel vgpos eindt.
LOOP AT gt_data INTO gw_data.
AT NEW lifnr.
NEW-PAGE.
sy-pagno = 1.
*-- Get the vendor name
CLEAR: gv_name1,
gv_telf1,
gv_telfx.
SELECT SINGLE name1 telf1 telfx
INTO (gv_name1, gv_telf1, gv_telfx)
FROM lfa1
WHERE lifnr = gw_data-lifnr.
ENDAT.
AT NEW matnr.
*-- Get the material description
CLEAR lv_maktx.
SELECT SINGLE maktx INTO lv_maktx
FROM makt
WHERE matnr = gw_data-matnr
AND spras = sy-langu.
ENDAT.
*-- If "only pending shipping notifications" is selected, remove all
* entries with no pending quantity
IF gw_data-lfimg LE gw_data-dabmg AND
pa_pend = 'X'.
CONTINUE.
ENDIF.
*-- Highlight entries where the SN delivery date is before the PO
* delivery date
IF gw_data-lfdat < gw_data-eindt.
FORMAT INTENSIFIED ON.
lv_adv = 'X'.
ELSE.
FORMAT INTENSIFIED OFF.
CLEAR lv_adv.
ENDIF.
lv_menge = gw_data-lfimg - gw_data-dabmg.
* Add by liza DEVK989704
clear: PARKING, T_PARK.
refresh: T_PARK.
Select * from ZPO_PARK into T_PARK
where vbeln = gw_data-vbeln
and lifnr = gw_data-lifnr
and matnr = gw_data-matnr.
Append T_PARK.
Endselect.
Loop at T_PARK.
PARKING = PARKING + T_PARK-menge.
Endloop.
gw_data-park = PARKING.
* End by liza DEVK989704
IF pa_fax IS INITIAL.
WRITE:/2(18) gw_data-matnr,
(40) lv_maktx,
gw_data-vgbel,
gw_data-eindt,
(04) gw_data-mfrgr,
(18) gw_data-verur,
gw_data-vbeln,
gw_data-lfdat,
(07) gw_data-lfimg UNIT gw_data-meins,
(07) gw_data-dabmg UNIT gw_data-meins,
(07) lv_menge UNIT gw_data-meins,
gw_data-lgort,
gw_data-erdat,
(01) lv_adv,
* Add by liza DEVK989704
(08) gw_data-park.
* End by liza DEVK989704
ELSE.
WRITE:/2(12) gw_data-matnr,
(26) lv_maktx,
gw_data-vgbel,
(16) gw_data-verur,
gw_data-vbeln,
gw_data-lfdat,
(07) gw_data-lfimg UNIT gw_data-meins,
(07) gw_data-dabmg UNIT gw_data-meins,
(07) lv_menge UNIT gw_data-meins,
gw_data-lgort.
ENDIF.
PERFORM write_vline.AT END OF lifnr.
If pa_dtim NE '000000'.
ULINE.
SKIP.
WRITE:/12 TS_VEND.
WRITE:/12 TS_ATT.
WRITE:/12 TS_FROM.
SKIP. "D01K934099
WRITE:/12'DELIVERY TIME:',pa_dtim. "D01K934099
SKIP. "D01K934099
WRITE:/12 TS_TEXT1.
WRITE:/12 TS_TEXT2.
WRITE:/12 TS_TEXT3.
WRITE:/12 TS_TEXT4.
Else.
ULINE.
SKIP.
WRITE:/12 TS_VEND.
WRITE:/12 TS_ATT.
WRITE:/12 TS_FROM.
WRITE:/12 TS_TEXT1.
WRITE:/12 TS_TEXT2.
WRITE:/12 TS_TEXT3.
WRITE:/12 TS_TEXT4.
Endif.
ENDAT.
move-corresponding gw_data to t_data.
move : lv_maktx to t_data-maktx,
lv_menge to t_data-menge,
lv_adv to t_data-adv,
parking to t_data-park.
append t_data.
L_X = 'X'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
NO_DIALOG = L_X
IMPORTING
OUT_PARAMETERS = GS_PRINT_PARAMS
VALID = G_VALID
IF SY-SUBRC 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
GS_PRINT_PARAMS-PAART = 'X_65_80'.
GS_PRINT_PARAMS-LINSZ = '185'.
* /*----------store the current selection screen details---------/
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = SY-REPID
TABLES
SELECTION_TABLE = T_RSPARAMS
EXCEPTIONS
NOT_FOUND = 1
NO_REPORT = 2
OTHERS = 3
IF SY-SUBRC 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* /*--- importing variable value set at first time to restrict the infinite loop --------/.
IMPORT VAR FROM MEMORY ID 'abc' .
VAR = VAR + 1 .
P_UNAME = SY-UNAME .
P_REPID = SY-REPID .
* /*------checking variable to restricted scecond time exction of this block of code---------/
IF VAR = 1 .
V_MEMID = 1 .
EXPORT VAR TO MEMORY ID 'abc' .
* /*-----------submitting the spool request--------------/
SUBMIT (P_REPID) WITH SELECTION-TABLE T_RSPARAMS
TO SAP-SPOOL
SPOOL PARAMETERS GS_PRINT_PARAMS
WITHOUT SPOOL DYNPRO
AND RETURN.
endif.
FREE MEMORY ID 'abc'.
* /*-------Calculating the lenth of report name--------/
v_len = STRLEN( P_REPID ) .
* /*-------consutrucing the database variable rq2name to search the spool request---------/
IF v_len >= 9 .
CONCATENATE P_REPID+0(9)
P_UNAME+0(3) INTO LC_RQ2NAME .
ELSE.
V_LEN1 = 9 - V_LEN .
DO V_LEN1 TIMES .
CONCATENATE V_TEMP '_' INTO V_TEMP .
ENDDO.
CONCATENATE P_REPID V_TEMP
P_UNAME INTO LC_RQ2NAME .
ENDIF.
* /*--------selecting the spool request using the above constructed variable----------/
SELECT * FROM TSP01 INTO TABLe IT_TSP01
WHERE RQ2NAME = LC_RQ2NAME .
* /*--------sorting the internal table-----------/
SORT it_tsp01 BY RQCRETIME DESCENDING .
* /*--------reading the first spool request-------/
READ TABLE IT_TSP01 INDEX 1.
* /*--------Convert Spool to PDF-----------/
IF GS_PRINT_PARAMS-PDEST IS INITIAL.
GS_PRINT_PARAMS-PDEST = 'LOCL'.
ENDIF.
CONCATENATE P_DEST T_DATA-LIFNR '.PDF' INTO G_FILENAME.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = IT_TSP01-RQIDENT
NO_DIALOG = SPACE
IMPORTING
PDF_BYTECOUNT = G_BYTECOUNT
TABLES
PDF = T_PDF
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 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. -
Balance Confirmation Report for multiple vendors
Hi all,
I have developed report in FI which gives details about opening balance,fiscal year, document number, posting date and amount in the output.In selection screen I am passing single values of fiscal year(GJAHR), vendor(LIFNR) and company code(BUKLRS). This report is working fine for single vendor but now I need to change it for multiple vendors. I tried but not getting desired result in the output.
Following is code for single vendor in selection screen.
SORT t_bsikbsak BY bukrs belnr gjahr buzei.
LOOP AT t_bsikbsak.
t_pre_bal-netpr = t_bsikbsak-dmbtr.
t_pre_bal-sgtxt = 'Opening Balance'.
IF t_bsikbsak-shkzg EQ 'H'.
t_pre_bal-netpr = t_pre_bal-netpr * -1.
ENDIF.
COLLECT t_pre_bal.
ENDLOOP.
LOOP AT t_pre_bal.
itab-netpr = t_pre_bal-netpr.
itab-sgtxt = t_pre_bal-sgtxt.
APPEND itab.
ENDLOOP.
SORT t_bseg BY bukrs belnr gjahr buzei.
CLEAR itab.
LOOP AT t_bseg.
ON CHANGE OF t_bseg-bukrs OR t_bseg-belnr OR t_bseg-gjahr.
READ TABLE t_bkpf WITH KEY bukrs = t_bseg-bukrs
belnr = t_bseg-belnr
gjahr = t_bseg-gjahr.
IF sy-subrc IS INITIAL.
itab-budat = t_bkpf-budat.
itab-belnr = t_bkpf-belnr.
itab-gjahr = t_bkpf-gjahr.
ENDIF.
ENDON.
IF t_bseg-koart = 'K' AND t_bseg-lifnr = s_lifnr.
itab-sgtxt = t_bseg-sgtxt.
READ TABLE t_bsak WITH KEY bukrs = t_bseg-bukrs
belnr = t_bseg-belnr
gjahr = t_bseg-gjahr.
IF t_bseg-shkzg EQ 'H'.
t_bseg-dmbtr = t_bseg-dmbtr * -1.
ENDIF.
itab-netpr = itab-netpr + t_bseg-dmbtr.
ELSEIF t_bseg-hkont = '0044100040'. " G/L for INTEREST EXPENSES
itab-inamt = t_bseg-dmbtr.
ELSEIF t_bseg-hkont = '0012300060'. " G/L for TDS ON INTEREST
itab-tdamt = t_bseg-dmbtr.
ENDIF.
AT END OF bukrs.
append_flag = 'X'.
ENDAT.
AT END OF belnr.
append_flag = 'X'.
ENDAT.
AT END OF gjahr.
append_flag = 'X'.
ENDAT.
IF append_flag = 'X'.
APPEND itab.
CLEAR itab.
CLEAR : append_flag.
ENDIF.
ENDLOOP.
Closing Balance
LOOP AT itab.
t_temp-netpr = itab-netpr.
t_temp-sgtxt = 'Closing Balance'.
COLLECT t_temp.
ENDLOOP.
CLEAR itab.
LOOP AT t_temp.
itab-netpr = t_temp-netpr.
itab-sgtxt = 'Closing Balance'.
APPEND itab.
ENDLOOP.
Kindly provide some input how to do it for multiple vendors in same code otherwise provide some suggestions for new code.
Thanks in Advance.waiting for response.
Thanks & Regards,
Harshada PatilHi,
Thanks for quick response.Following is the structure of internal tables which I am using in this program.
TYPES : BEGIN OF ty_bsikbsak ,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
zuonr TYPE bsik-zuonr,
shkzg TYPE bsik-shkzg,
dmbtr TYPE bsik-dmbtr,
END OF ty_bsikbsak.
TYPES : BEGIN OF ty_bkpf ,
bukrs TYPE bkpf-bukrs,
belnr TYPE bkpf-belnr,
gjahr TYPE bkpf-gjahr,
bldat TYPE bkpf-bldat,
budat TYPE bkpf-budat,
stblg TYPE bkpf-stblg,
stjah TYPE bkpf-stjah,
END OF ty_bkpf.
TYPES : BEGIN OF ty_bseg ,
bukrs TYPE bseg-bukrs,
belnr TYPE bseg-belnr,
gjahr TYPE bseg-gjahr,
buzei TYPE bseg-buzei,
koart TYPE bseg-koart,
shkzg TYPE bseg-shkzg,
dmbtr TYPE bseg-dmbtr,
sgtxt TYPE bseg-sgtxt,
hkont TYPE bseg-hkont,
lifnr TYPE bseg-lifnr,
END OF ty_bseg.
DATA : t_bsik TYPE TABLE OF ty_bsikbsak WITH HEADER LINE.
DATA : t_bsak TYPE TABLE OF ty_bsikbsak WITH HEADER LINE.
DATA : t_bsikbsak TYPE TABLE OF ty_bsikbsak WITH HEADER LINE.
DATA : t_bkpf TYPE TABLE OF ty_bkpf WITH HEADER LINE.
DATA : t_bkpf2 TYPE TABLE OF ty_bkpf WITH HEADER LINE.
DATA : wa_bkpf TYPE ty_bkpf .
DATA : t_bseg TYPE TABLE OF ty_bseg WITH HEADER LINE.
DATA: BEGIN OF t_pre_bal OCCURS 0,
netpr TYPE bseg-dmbtr,
sgtxt TYPE bseg-sgtxt,
lifnr TYPE bseg-lifnr,
END OF t_pre_bal.
DATA: t_pre_bal1 LIKE t_pre_bal.
DATA: BEGIN OF t_temp OCCURS 0,
netpr TYPE bseg-dmbtr,
sgtxt TYPE bseg-sgtxt,
lifnr TYPE bseg-lifnr,
END OF t_temp.
DATA: BEGIN OF itab OCCURS 0,
gjahr LIKE bsik-gjahr,
belnr LIKE bsik-belnr,
budat LIKE bkpf-budat,
sgtxt LIKE bseg-sgtxt,
lifnr LIKE lfa1-lifnr,
netpr LIKE bseg-dmbtr, " Net Amount
inamt LIKE bseg-dmbtr, " Interest Amount
tdamt LIKE bseg-dmbtr, " TDS Amount
END OF itab.
RANGES: r_budat FOR bkpf-budat.
I have Included vendor(LIFNR) in all these structures.Now I am using three internal tables to hold opening balance, Closing balance and line item accounting documents from bseg table respectively.here, I need to collect all these three internal tables into one internal table according to vendor(LIFNR) with it's opening balance, accounting documents and closing balance. can anyone guide me through this so that I can collect all these three internal tables into single one.
Thanks & Regards,
Harshada Patil
Edited by: Harshada.up on Feb 15, 2011 9:33 AM -
Condition records- setting printer for multiple vendors at the same time
Hi all,
I have maintained condition record for POs for Key combination of Doc type,Purch Org and vendors.Now for a particular doc type and P.Org , I have around 50 vendors. I need to change the printer for all these 50 vendors to 'printerx'.Is it possible? I tried selecting multiple vendors at a time and changed the printer but its not working.Hi Saurav ,
You can achieve this through SCAT transaction.
For running SCAT take the help of ABAP team.
I hope u might be having the list in the form of text file.
If not , download the same from NACH table.
Regards
Ramesh Ch -
One cheque for multiple vendors
hi,
is it possible to generate one cheque for multiple vendors ?
cheque will be sent to bank and bank will deposit the amounts into vendor banks.
Can you anybody help me?
regards,
kalyanHi
Yes. you can do it
First transfer the amount to bank and from there bank will transfer the amount to respective vendors through ther banks.
Go for implementing automatic payment programme according to your client reqyuirement. Check TCode F110 which is master transaction for APP. Check at TCode F110-Environment-maintain Config.....
Cheers
Srinivas -
Hello Experts,
In SAP, whether an RFQ can be sent to multiple vendors.?
In ME41 (RFQ Creation), we have the option of mentioning only one vendor.Whether the same RFQ can be created/sent to multiple vendors?
Please clarify.
Regards
MaheshHi,
We can surely send one RFQ to multiple vendors (vendors having master record as well as one time vendor). At first we create RFQ for material or service i.e. we maintain header data and item description in item overview, after that u can send it to multiple vendors by entering vendor name or entering one time vendor detail in vendor address tab which opens separate screen, here when u press save a particular RFQ is generated for the relevant vendor u maintain. Than u will get the item overview screen again if u want than do some changes or not and again send it to another vendor by the same process.
Item overview serves as a template in which u maintain ur requirements and than u use this to send multiple vendors, to end end the RFQ creation press exit.
Regards,
Man -
One cheque for multiple vendors in diff comp codes
Good day all
My client wants to pay multiple vendors in multipe company codes with one cheque.
Ex.1. Vendor 123 in Comp code 1
Vendor 555 in Comp code 2
Vendor 789 in Comp code 3
Must all be paid with one cheque to Vendor 987 in Comp code 1.
OR
2. Vendor 123 in Comp 1
Vendor 123 in Comp 2
Vendor 123 in Comp 3
Must all be paid with one cheque to Vendor 123 in Comp code 1.
Only ONE cheque in both cases must be created.
Is this at all possible with F110, check payments?
Any advice or ideas would be greatly appreciated.
Regards
LouiseHI,
Do vendor transfer posting from one to another company code that transfer remaining two vendors to one main vendor through cross company transaction and then clear the open items of remaining two vendors. And run F110 for Main vendor to whom who want to print cheque. -
Multiple Vendors for one Purchase order in delta load
Hello,
While Extracing data from 2LIS_02_SCL we are getting 2 vendors for a singe purchase order , as we know that for a purchase order we cannot have multiple vendors.
When i checked data in deta queue (RSA7) we are able to see only single vendor for 1PO, but when we load to bw and checked data in PSA we are getting 2 different vendors for same PO.
Regards,
Vasu.Hello,
As per my understanding you are getting data upto delat queue (RSA7) Correctly and you are getting incorrect data at PSA level In bw.
i think you must have some customer exit in ECC for the datsource 2lis_02_scl. so i would say that there may be some problem in the code since the customer exit code will get triggered after RSA7 and before PSA in BW..
Additionally you can cross check in RSA3 with update mode as 'D' which gives delta before loading to BW.
Debugging option :
Load data to BW and pick the PO having multiple vendors and in ECC dubug using RSA3 with update mode as "R" inorder to fing the problem in customer exit code.
Hope this helps you..
Regards,
Srikanth. -
Error when blocking a vendor in source list
We are trying to block a vendor from the Source list (Tcode ME01), however this vendor was created in a different system and imported into our current system.
The error message we receive states "Source list record created in a different system". We are unable to save the change, so it is not a warning message, but an error.
Any help would be appreciated.
Thank youyour source list records get created in a central system. if you delete an entry you create inconsistencies to your central system (and you may get this record back soon undeleted).
Contact the guys who create the source list in this different system and let they maintain the block and distribute it to your system again with ALE. -
What are the different types of blocking in vendor / customer MD?
Hi,
in my firm we noticed that several customers were marked for deletion but this mark only provides a warning message once sales order is set up.
We'd like to know how to perform actual blocking of sales order / delivery / billing for customers - what should be done and how in the customer Master Record?
Same problem goes to vendors. Marking for deletion only provides a warning message once a PO is set up, what should be marked and in which transaction in order for this vendor to be blocked for PO / Goods Receipt / Invoice receipt / payment?
Would appreciate your responseDear okit83,
There are many ways to block the vendor/customer. As above mentioned VD05/XK05 will be used to block the customer/vendor.
Apart from that we can block the customer/vendor from the same master data is self.
Go to xd02/xko2-> Extras->Block data. Here tou can block the customer/vendor from one sales area or from all sales areas pertinent to delivery,sales billing(CUSTOMER). Where as vendor allcompany codes,all purchase organizations.
Similarly you can delete the customer/vendor by using delition flags By XD02/XK02->extras->Deletion flags.
So the customer/Vendor will not be used
Please check and revert
Thanks&Regards
Raghu.k -
Third Party Order processing in case of multiple vendors
Hi,
With the third party order processing; purchase requisition gets created automatically based on the scheduling item category. This process works fine when there is only one vendor. In case if we have multiple vendors for the same product; purchase requisition gets created with out any vendor reference. These orders needs manual intervention to assign the source of supply.
In stead of this; we would like to automate the process of the selecting the vendor automatically? Is there any by means? Currently we do populate the corresponding vendor partner function in the sales order item level. Can this be used as reference vendor during purchase requisition creation process? Is there any configuration or customitization?
Have any one come across this?
Thanks for the answer..
Regards,
NagarjunaThere's a default vendor in source lists.
-
Need Multiple Units of Measure for a given material due to multiple vendors
Hello,
We have a requirement where we must have multiple units of measue (each, box, case, pallet) for a given material.
Background:
We have multiple vendors for one SAP material number. We need to store 4 levels of units of measure for each vendor+material combination.
Unit of Meaure levels
1. Each
2. Innerpack (ex: 12 each = 1 innerpack)
3. Box (ex: 36 eaches = 1 box)
4. Pallet (ex: 100 eaches = 1 pallet)
Standard SAP allows in MM01 additional data --> Units of Measure only 1 Ea, Box, Plt, etc.
Our requirement is to allow multiple Units of Measure due to multiple vendors providing the same material.
So, our unique combination is by a Material+Vendor.
We are considering adding the vendor name and vendor number to the material master --> additional data --> Units of Measure tab.
Does this seem like a good solution? What impacts do you foresee with approach?
Any alternatve solutions?
We thought we could enhance the purchasing info records to allow multiple units of measure too but then we need to also add many fields to hold the weight, lenght, height, width, volume, country of origin, etc.
Please recommend a best practice or solution to handle this requirement.
Thanks in advance!!!Hi,
Maintain the alternative units in Material Master in Additional Data -> Units of Measure section with proper conversion factors.
Create individual info-records i.e. per mtl-vendor combination & in the info-record maintain the order unit, along with other details as required.
Now when you create a PO, the details will be read from the info-record. To test the same, create them in your sandbox & see if it meets your requirement.
Hope the above clarifies your query.
Regards,
Vivek -
Reg:Single Check for Multiple Vendors
Hi Experts,
I want to Issue a Single check for all vendor open items...
For this is I created one Group Key and assigned in the vendor master record, but while doing the payment separate check issuing for each vendor,
any ideaHi,
Can you check the below thread of urs.
[Reg:Single Check for Multiple Vendors]
In addition to the above, please make sure that in OBVU, the check box separate payment for each ref is deselected for your questioned comapny code.
You would have continued your earlier thread instead, rather than a new thread.
Thanks,
Srinu -
Multiple vendor payments with a single u201CYOURSELFu201D cheque
Hi,
How do we handle multiple vendor payments with a single u201CYOURSELFu201D cheque, drawn in favor of the paying banker? OR NEFT transfers in SAP.
Thanks,
M. SenthilHi
First things first:
1. You want to create a single payment document for multiple vendors. In such a case, you will not be able to use F110. You need to use F-53 or F-f8 in such a case. In the all the vendor masters, maintain the alternative payee with Description as "YOURSELF". There after, if you are using F-53, use FBZ5 to print the cheque in the name of alternative payee.
2. if you are using F110, multiple payment documents will be created for different vendors. In FBZP Config, you can assign the Payment Advise Form in the Payment Method Step in FBZP Config
Regards
Sanil
Maybe you are looking for
-
All Real Instruments coming through in Mono
I am using a lexicon Omega interface into garage band. The input settings say stereo but every real instrument I record comes through in mono. The only time I can get stereo is when I use one of the garage band instrument settings which is fine for g
-
How to handle TeX/LaTeX equations in InDesign?
Hi All, I've recd. a request to handle one of the title already done in LaTeX software in InDesign, for this I need to do the below tasks: (1) Need to convert the LaTeX data to load in InDesign (2) Need to convert the equations done with LaTeX coding
-
What's the difference between "tar" command and ufsdump?
what's the difference between "tar" command and ufsdump?
-
Can't connect Azure Database in SQL Server
Hi, I completed setting up the database and server on Azure, but when i tried to connect it using SQL Server 2012. I got an error. TITLE: Connect to Server Cannot connect to tcp:*******.database.windows.net,1433. ADDITIONAL INFORMATION: A network-rel
-
Hello. I just installed Arch and all things work well except one issue: I want to setup my real name in 'System Settings' - 'Account Details' - 'Password & User Account' but when I click 'Apply' there is a dialog asking me for my password and I type